I have worked with JSF for almost 4 years. First time when I had a
chance to work with GWT, I was very excited. Like many Java developers I
was like 'Wow I don't need to play with those bloody tags and elements
and now it's pure Java code!!!'... I was so happy but my happiness
didn't last very long.
Programming is my passion. I hate writing codes that become a mess later and unfortunately this is what will eventually happen with GWT.
The thing is you can't rely on reviews and features of a software or an API, in action everything goes different way. Specially when it comes to large scaled application and in an environement where everything is urgent and importnat... well, I think all software companies are the same in this regard...
The fact is that in a team of developers not every one cares about best practices, design patterns and even if you have very experienced designer, solution architect etc, still you can't force the team to develop a well-designed software. So what?
The answer is "a good framework is the solution". A good framework not necessarily means an easy to use nor a fast development environment. Business owners consider these as the best features for a framework but we miss the facts that:
And of course many other facts but we should be aware that it's almost impossible to achieve all of these and yet to have a fast and easy framework to work on!
So what is a good framework? A good framework in my opinion:
.... And yes again many other facts...
Now going back to the title of this post, JSF and JBoss Seam have a lot of critisism and so does GWT. If we read reviews from experts about GWT and JSF, we will end up in GWT as a good framework (however this doesn't mean there is no good review about JSF),
BUT in action:
If you are a JSF developer and never worked with GWT, then you probably disagree but to me, GWT is created to hide the complexity of javascript and HTML mess while the final product is a nightmare.
Just look at a class in GWT and you'll see a handful of asynchronos calls that not only look aweful but also difficult to read.
You can see everywhere events/listeners and fatty-several-meters-long asynchronos calls are pouring like cats and dogs.
Reusing a functionality or a web page as a component is not easy in GWT. To do so you hve to sacrifice simplicity and you will end up with another sackful of codes.
Based on my experience with both, I believe the combination of JSF, JBoss Seam and JQuery works extremely well to develop a large scale application. It also much easier to find a bug and reuse a page in other area.
It is very flexible so you can easily modify/remove/add a component in JSF with less side effect in other area in order to improve performance or functionality or to enhance it. While in GWT, changing a small peice of code may cause other part of application, that you never expect, to break.
I have to say I prefer awkward AJAX calls from JSF rather than messy RPC calls of GWT.
I also prefer clumsy disgusting tags and elements in JSF and not illusive-Java-code-as-html feature of GWT. (Don't get me wrong, I always hated front-end programming and never been interested. Like most of developers I love back-end programming but as a developer you have to work with both).
Programming is my passion. I hate writing codes that become a mess later and unfortunately this is what will eventually happen with GWT.
The thing is you can't rely on reviews and features of a software or an API, in action everything goes different way. Specially when it comes to large scaled application and in an environement where everything is urgent and importnat... well, I think all software companies are the same in this regard...
The fact is that in a team of developers not every one cares about best practices, design patterns and even if you have very experienced designer, solution architect etc, still you can't force the team to develop a well-designed software. So what?
The answer is "a good framework is the solution". A good framework not necessarily means an easy to use nor a fast development environment. Business owners consider these as the best features for a framework but we miss the facts that:
- A software will be grown just like branches of a tree
- Business logics are not always the same for different clients and nobody wants to manage multiple branches/versions of the same software for different clients.
- When a software is big enough, changing any part of it costs the company a lot of money and time.
And of course many other facts but we should be aware that it's almost impossible to achieve all of these and yet to have a fast and easy framework to work on!
So what is a good framework? A good framework in my opinion:
- Forces developers to create a well-structured application while they are still free to break the rules and go off the road.
- When it comes to a critical issue where nobody has any idea about it, it's easier to track down the culprit without even debuging the code and debuging makes it much more easier.
- To find out what's happening for a particular finction and what's behind the scene, a developer (particularly those other than the person who created the code) doesn't have to look at a dozen of classes and find their usages in other area, instead everything is clear!
.... And yes again many other facts...
Now going back to the title of this post, JSF and JBoss Seam have a lot of critisism and so does GWT. If we read reviews from experts about GWT and JSF, we will end up in GWT as a good framework (however this doesn't mean there is no good review about JSF),
BUT in action:
- When it comes to a large application with strange complexities and rules that don't make sense from programming point of view yet they are crucial for clients.
- When it comes to time restriction and urgency of tasks and the horrible stress for developers
- When it comes to a point where everyone tells you "Don't worry about the design and those bullshits just get it done quickly for the next release."
- When it comes to a strange bug in code where everyone blames the others and nobody knows what to do and managers ask everybody, including people in HR, to stay overnight and test and find the problem.
If you are a JSF developer and never worked with GWT, then you probably disagree but to me, GWT is created to hide the complexity of javascript and HTML mess while the final product is a nightmare.
Just look at a class in GWT and you'll see a handful of asynchronos calls that not only look aweful but also difficult to read.
You can see everywhere events/listeners and fatty-several-meters-long asynchronos calls are pouring like cats and dogs.
Reusing a functionality or a web page as a component is not easy in GWT. To do so you hve to sacrifice simplicity and you will end up with another sackful of codes.
Based on my experience with both, I believe the combination of JSF, JBoss Seam and JQuery works extremely well to develop a large scale application. It also much easier to find a bug and reuse a page in other area.
It is very flexible so you can easily modify/remove/add a component in JSF with less side effect in other area in order to improve performance or functionality or to enhance it. While in GWT, changing a small peice of code may cause other part of application, that you never expect, to break.
I have to say I prefer awkward AJAX calls from JSF rather than messy RPC calls of GWT.
I also prefer clumsy disgusting tags and elements in JSF and not illusive-Java-code-as-html feature of GWT. (Don't get me wrong, I always hated front-end programming and never been interested. Like most of developers I love back-end programming but as a developer you have to work with both).
Comments
Thanks
I agree with you 100% percent.
If somebody ask me I will entirely recommend JSF.