tag:blogger.com,1999:blog-73874771180344207312024-02-19T21:42:59.510+01:00Yet Another Java BlogJava, The light is onAhmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-7387477118034420731.post-55210204356628183672010-01-07T17:17:00.003+01:002010-01-07T17:26:34.715+01:00How things work : SQL Select StatementIntroduction:
Ever asked your self how things work inside the SQL Select statement? In this article we won’t be talking about how to write SQL Select statement but rather we will be talking about the algorithms and the methodology behind the Select statement and how SQL decides which algorithm it will use to filter out the results and return our expected results.
Selecting an Algorithm:
In Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com2tag:blogger.com,1999:blog-7387477118034420731.post-34460318616387148742009-09-21T15:31:00.024+02:002009-09-21T16:36:56.041+02:00How things works : SQL Order By ClauseIntroduction:RDBMS! Everyone got involved with something related to RDBMS even if it was just a small task. In this article we will be talking about how SQL statements work (if we want to implement our own statements in java) For example the select statement we now how to use it and how to query the table we want but do we know what happens when we ask the DB system to query for a specific data Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com1tag:blogger.com,1999:blog-7387477118034420731.post-10737740960854355782009-08-08T02:05:00.002+02:002009-08-08T02:05:56.587+02:00Intro to Security,Security Design and Security Threats part 2Introduction:In the previous part we talked about introduction security concepts and now in this part we will be talking about security threats and hacking attempts beside security design and how to build a secure solution along.A Secure Solution!Let’s start by this hacking wise quote:“Give a man a crack, and he'll be hungry again tomorrow, teach him how to crack, and he'll never be hungry again.Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com1tag:blogger.com,1999:blog-7387477118034420731.post-5957953708417071852009-06-20T21:18:00.026+02:002009-06-20T22:14:40.076+02:00Intro to Security, Security Design and Security ThreatsIntroduction:Most of organizations has data which it doest want it to be read or compromised by any one without authorization and in order to do so they have to employee security , but most of the organization don’t think about security as a goal but as a feature to be added to their product or environment or so.In this article we will be talking about security, security design and security Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com0tag:blogger.com,1999:blog-7387477118034420731.post-53230264069960262572009-05-03T20:34:00.020+02:002009-05-03T23:21:31.304+02:00Intro to Caching,Caching algorithms and caching frameworks part 5Introduction:In part 1 we talked about Caching introduction and some terminologies of caching and in part 2 and part 3 we have seen some implementation of the famous replacement cache algorithms and in part 4 we saw comparisons between some famous caching frameworks and in this part we are going to continue what we started in part 4 and as in part 4 we will concentrate only on memory caching.The Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com8tag:blogger.com,1999:blog-7387477118034420731.post-58957034235303498102009-03-24T21:55:00.032+01:002009-03-31T21:07:56.284+02:00Intro to Caching,Caching algorithms and caching frameworks part 4Introduction:In part 1 we talked about Caching introduction and some terminologies of caching and in part 2 and part 3 we have seen some implementation of the famous replacement cache algorithms and now in this part we will see comparison between open source java caching frameworks as I am not that rich to buy commercial frameworks :D.In this part we will talking about OSCache,Ehcache,JCS and Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com8tag:blogger.com,1999:blog-7387477118034420731.post-63575568719358738152009-02-14T21:55:00.011+01:002009-02-14T23:52:15.753+01:00Intro to Caching,Caching algorithms and caching frameworks part 3Introduction:In part 1 we talked about the basics and terminologies of cache and we have also shown replacement policies , in part 2 we implemented some of these famous replacement polices and now in this part we will continue talking about the implementation of two famous algorithms which are LFU and LRU. Again, the implementation in this article is for sake of demonstration and in order to use Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com14tag:blogger.com,1999:blog-7387477118034420731.post-79925514605485627812009-01-13T22:05:00.021+01:002009-01-15T11:05:14.454+01:00Intro to Caching,Caching algorithms and caching frameworks part 2Introduction:In this part we are going to show how to implement some of the famous replacement algorithms as we mentioned in part 1, the code in this article is just for demonstration purpose which means you will have to do some extra effort if you want to make use of it in your application (if you are going to build your own implementation and wont use any caching frameworks)The Leftover policy:Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com12tag:blogger.com,1999:blog-7387477118034420731.post-61429136041199853992009-01-02T12:09:00.033+01:002009-05-03T22:18:26.679+02:00Intro to Caching,Caching algorithms and caching frameworks part 1Introduction:A lot of us heard the word cache and when you ask them about caching they give you a perfect answer but they don’t know how it is built, or on which criteria I should favor this caching framework over that one and so on, in this article we are going to talk about Caching, Caching Algorithms and caching frameworks and which is better than the other.The Interview:"Caching is a temp Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com57tag:blogger.com,1999:blog-7387477118034420731.post-38173100036518015832008-12-23T23:30:00.036+01:002009-01-19T22:01:44.786+01:00Scripting in JDK6 (JSR 223) Part 2Its Lunch Time!After programmer 2 shown programmer 1 how to deal with JSR 223 or JDK6 scripting ( part 1) programmer 2 went for lunch as he didn’t eat anything since yesterday and left programmer 1 to meet his fate.Programmer 1 began to apply what he learned from programmer 2 and stuff went so bad, after 30 minutes programmer 2 came back.Programmer 2: Man, how is everything going? (While he was Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com7tag:blogger.com,1999:blog-7387477118034420731.post-29132262448907561472008-12-12T23:30:00.054+01:002008-12-13T13:59:57.719+01:00Scripting in JDK6 (JSR 223) Part 1Introduction:For sure most of us (mm guess so) have heard about the Scripting provided in Java 6 (Mustang) or JSR 223, 1st time I saw that (just saw the title) I thought that the Java guys will enable us to compile and run JavaScript scripts and that’s the end, well nope that wasn’t what Scripting in java 6 about but actually it is about enabling scripting languages to access the java platform Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com2tag:blogger.com,1999:blog-7387477118034420731.post-35460518583515674562008-10-10T23:06:00.003+02:002008-10-10T23:08:15.965+02:00Another Late Postsorry sorry sorry sorry sorry sorry sorry sorrybelieve me i am in the middle of something and once i am done (either did it or no) i will tell youeverything about what i am doing (or was doing in the future :D )just wait till november ;) and i will tell you everything sorry for not posting for a long time :(Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com0tag:blogger.com,1999:blog-7387477118034420731.post-66938454187294343802008-09-17T00:13:00.002+02:002008-09-17T00:15:32.483+02:00Late Post !Am sorry about being late :D (hehe in case if you are reading this blog) i have been busy sooo much in work and some other stuff soon i will post a nice article (hope so)Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com0tag:blogger.com,1999:blog-7387477118034420731.post-69169632308064548762008-07-23T19:41:00.022+02:002008-12-13T01:31:52.858+01:00Single Instance From Your Application ?Introduction:some people want to have only single instance running from their application and if the user clicked/started the executable file for the application again nothing will happen or the user will be prompted that there is an already running instnace(something like MSN you only have one instance an no matter how many time you click the MSN exe icon you will just get the same instance).Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com12tag:blogger.com,1999:blog-7387477118034420731.post-26924647446558354532008-07-07T20:02:00.017+02:002008-12-13T01:33:53.927+01:00Singleton Tips and TricksIntroduction:Singleton ? what is that ? i guess i have heard someone talking about it mmm but i don't know what does it mean :( , ok don't be sad cheer up we are going to talk about Singleton and some tips and tricks for it. so lets start by defining Singleton.A singleton is a class that is instantiated exactly once no more no less, so this mean i only have oneunique instance from a specific Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com0tag:blogger.com,1999:blog-7387477118034420731.post-64336162452552998152008-06-23T09:24:00.002+02:002008-12-13T01:34:45.483+01:00IoC (Inversion Of Control) and Dependency injection (DI) Introduction: Lots of us hear this word and also hear that this container is using IoC (inversion of control) so what is it all about and what does this mean? we will be working using Spring IoC through this article so lets start by checking the formal definition of the Dependency injection:“Dependency injection (DI) in Computer programming refers to the process of supplying an external Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com7tag:blogger.com,1999:blog-7387477118034420731.post-7587562666626161292008-06-18T14:53:00.001+02:002008-12-13T01:36:08.926+01:00DOM,SAX,StAX,TrAX !!!Difference between the following guys (we are talking about xml here :D ):1-DOM2-SAX3-StAX4-TrAXGuess that all of us knows what is DOM and some might know what is SAX but the major don’t know what is StAX and TrAX(most of ppl don’t know what is that)As expected from the mighty JAVA it supports more things than the humble .NET :D as we can see in .NET 2003 it only supports DOM and don’t support Ahmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com1tag:blogger.com,1999:blog-7387477118034420731.post-46139804433708934372007-09-11T20:35:00.000+02:002007-09-11T21:05:01.170+02:00Defensive Copy!This way of programming makes sure that your code is safe 100%, even if java code is safe codebut there are still some stuff should be done by the programmer to acquire the 100% as someclients of your class will do their best to destroy its invariants so lets move on and see how can we do this :public class Test {private Date start, end;public Test(Date start,Date end){//make check here to ensureAhmed Alihttp://www.blogger.com/profile/12039957853995064708noreply@blogger.com0