I am a programmer but I hate grammar. Here you will find what I did, doing , will do ... Scattered pieces of knowledge that I have deleted from my mind to the trash bin through out my boring daily coding life. I will also report some of my failures in life so dear to me not success, because I have always learnt much only when I fail.
Tuesday, July 23, 2013
Wednesday, July 10, 2013
Tpye french accents with a QWERTY keyboard
Hi, if you use french language and familiar with english you may have come through this issue. If you don't want to install a third party software or alter your PC configuration, here is a simple a easy way to do that.
Just type ALT + Three number as follows.
ALT 130 = é
ALT 131 = â
ALT 132 = ä
ALT 133 = à
ALT 134 = å
ALT 135= ç
ALT 136 = ê
and soon.
Just type ALT + Three number as follows.
ALT 130 = é
ALT 131 = â
ALT 132 = ä
ALT 133 = à
ALT 134 = å
ALT 135= ç
ALT 136 = ê
and soon.
Friday, July 5, 2013
Warning: mysl_result() expects parameter 2 to be long, string
You may have certainly come across this problem.
To solve this problem you have to set the second parameter as zero 0 to ask mysql to start from the first row.
e.g: $res = mysql_result($comment_result, 0);
Hope it helps.
To solve this problem you have to set the second parameter as zero 0 to ask mysql to start from the first row.
e.g: $res = mysql_result($comment_result, 0);
Hope it helps.
Monday, June 24, 2013
Hibernate Vs Spring
Hi,
Either your are a professional or a novice I am sure you have already been stroke the first time by these terms Hibernate, Spring and then ask yourself what is even the difference between them.
Spring can be compared with JSF or STRUTS.
Spring is an enterprise web application framework that make use of hibernate to persist data.
Spring itself does not have persistence features it borrows them from hibernate.
Spring allows programmer to follow MVC architecture.
I hope you have certainly got the idea.
Either your are a professional or a novice I am sure you have already been stroke the first time by these terms Hibernate, Spring and then ask yourself what is even the difference between them.
- Hibernate = a persistance framework.
- Spring = a web application framework
Spring can be compared with JSF or STRUTS.
Spring is an enterprise web application framework that make use of hibernate to persist data.
Spring itself does not have persistence features it borrows them from hibernate.
Spring allows programmer to follow MVC architecture.
I hope you have certainly got the idea.
Friday, June 21, 2013
EJB vs JPA vs Hibernate : Part 1
Hi,
Today I am going to address one of the hot issues that I always try to grab.
Like many newbies making their first step with the persistence, sometimes they are confused with these terminologies: ejb, jpa, hibernate and so on.
The persistency technology has become unavoidable giving the advantages that it provides over JDBC: speed, flexibility , security at the price of a higher learning curve.
This is going to be a continuous debate and I will go straight to the point.
In short how can we differentiate between EJB, JPA and Hibernate.
Part 2 coming soon.
Today I am going to address one of the hot issues that I always try to grab.
Like many newbies making their first step with the persistence, sometimes they are confused with these terminologies: ejb, jpa, hibernate and so on.
The persistency technology has become unavoidable giving the advantages that it provides over JDBC: speed, flexibility , security at the price of a higher learning curve.
This is going to be a continuous debate and I will go straight to the point.
In short how can we differentiate between EJB, JPA and Hibernate.
- EJB: it a large set of specifications (security, transactions, persistence management, Timer services , administrations)
- JPA: it a part of EJB specification that refers to persistence. (i.e: some empty crud methods)
- Hibernate: it an implementation of JPA specification. (i.e: implemented crud methods)
- Hibernate is just an ORM tool.
- Hibernate and EJB ( or EJB 3) are completely different concepts and cannot be compared. EJB 3.0 is a specification of architecture for developing and deploying server side managed components (beans). The architecture manages the lifecycle of beans and also provides services like security, transactions, persistence management, Timer services , administration etc.
- Using JPA in combination with EJB 3 is the easiest solution. Using JPA or Hibernate standalone requires much more verbose code and you manually have to manage transactions, which can be a pain.
- JPA vs Hibernate is another debate. JPA has the benefit of having the standardized interfaces, so more developers will likely be familiar with it. On the other hand, the native Hibernate APIs are always a super set of those of JPA and thus offer more power.
- JPA is a set of methods without implementation. This set provides everything you need to organize the mapping of objects to database tables, CRUD operations, managing transactions. Meanwhile, Hibernate is one of the implementations of JPA. It contains all the method’s realizations and even extends the set of methods with its own.
Part 2 coming soon.
Subscribe to:
Posts (Atom)
