What, besides servlets and jsp, may be used for web-application?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Imagine, that we have a web-application (which opens in browser).
Java is used on server side (we have an application server, for example Glassfish).
Question.
Does it mean that servlets (or jsp) are neceessarily used? Or is there another way to generate html pages? (The problem is that I've heard about many technologies, like ejb and others, but didn't use them).
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Bear Bibeault wrote:(though some frameworks may provide their own alternative to JSP). .
could you please tell which frameworks may provide their own alternative to jsp (for example)?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
If you use the component-oriented framework like Wicket you use HTML and backing classes. You won't see any servlets there (while there still is a servlet or filter serving your requests, but framework managed).
When using GWT you will produce client-side JavaScript out of your Java code that can communicate to the server in different ways but typically all will be servlet powered (a custom GWT RPC servlet which eases developement or somethinglike REST which can faciliate servlets too, if Java based).
So Java (the ecosystem) allows a lot of choices and provides a lot of frameworks. Most (all?) of the web application frameworks use servlets internally, but you won't see them or use "raw" servlets mostly. JSP can be replaced much easier.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Now I'm puzzled, when ejb is needed.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Servlets and JSP were intended as (one kind of) frontend for JavaEE application. But you can use these without the need for EJB in a container that does not know about EJB (a servlet container like Tomcat). In fact this allows for loose coupling between business layer and presentation layer and additional security. As EJB were not quite ... fun to program in earlier iterations, people built other application frameworks that could be used within a simple servlet container (frameworks like Spring). So you can have one without the other, mutually.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hauke Ingmar Schmidt wrote:EJB, Enterprise Java Beans, are part of JavaEE. They are (part of) a framework to build enterprise-y applications. These applications don't need to have a web frontend.
Not true.
EJB are/can be used to execute the business logic in Java web applications (though you need an application server or an embedded EJB container inside the web container).
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
John Todd wrote:
Hauke Ingmar Schmidt wrote:EJB, Enterprise Java Beans, are part of JavaEE. They are (part of) a framework to build enterprise-y applications. These applications don't need to have a web frontend.
Not true.
EJB are used to execute the business logic in Java web applications (though you need an application server or an embedded EJB container inside the web container).
Hm. They can be used this way, but it is not the only way. EJB are not mere web adapter for business logic implemented by another system.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
These applications don't need to have a web frontend
It is not true that enterprise application don't need to have a web front end.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
John Todd wrote:What I was talking about is your sentence:
These applications don't need to have a web frontend
It is not true that enterprise application don't need to have a web front end.
Then maybe I just got caught in the subtleties of the English language and some false friends...
What I wanted to express is: These application may have a web frontend, but it is not mandatory. They can have different or multiple frontends as well. EJB are not bound to servlets/JSP, it is only one possibility.
(May, need, must, need, have... I need to do some vocabulary brush-up.)
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
John Todd wrote:What I was talking about is your sentence:
These applications don't need to have a web frontend
It is not true that enterprise application don't need to have a web front end.
Huh? There are plenty of enterprise apps that do not have a web front end. What are you talking about?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hauke said:
These applications don't need to have a web frontend
This is generalization, some do need web front end and some don't.
Maybe it is a matter of miscommunication
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
John Todd wrote:Maybe it is a matter of miscommunication
Indeed, I think so. In this context "don't need" means: they may have, but not necessarily so. In other words: some do, and some don't.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Is it common to have web-based front-end and business logic on ejb?
In case if servlets are used separately (without ejb), who/what implements business logic? Does developer jus tcodes his own java classes (not using ejb) ?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
SCJP 1.6,Preparing (Tryin to prepare) for scwcd
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Thanks & Regards
Sidharth Pallai
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Sidharth Pallai wrote:But EJB is nowadays a tiring job for any developer to code specifc segments of functionalities ... [snip] ... and lots more
This sounds a bit as if you may not have kept up-to-date with what's happened in JEE 5/JEE 6 - which introduced a lot of the concepts you're talking about to JEE, for example in the shape of JPA. There's nothing wrong, of course, with checking out Spring, but it's not as light-weight as it used to be, and JEE has gained considerably on it. Plus, some of its constituent pieces (like JPA) can be used in web apps without having to run a full JEE server.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Sidharth Pallai wrote:Thats appropriate, But EJB is nowadays a tiring job for any developer to code specifc segments of functionalities (Transactions/Security/Concurreny/JNDI Lookup) and at the same maintain better design approach. which is a cumbersome. So, todays trends provides Spring Framework, that comes up all-in-one plate to pick/use features which you need. Services are already in place , we just need to provide our implementations, and at the same mainatin design protocols like coupling throught DI/IOC , AOP , WebMVC, DAO integration with ORM , integration with struts/velocity/jsf... and lots more. !! Go through Spring Framework concepts , it will fetch you how to place ut problem state into designated places and make them feel/work in a better fashion , i mean in OOP's way!
Wow! No disrespect but what century are you from man?. Spring is an awsome framework at least you got that one right. But Jave EE 6 has introduced some fantastic features and EJBs are now pojos. I hope this doesn't offend you as that is not my intention but I suggest you please read about the latest JAVA EE specification before making those claims as they are now entirely outdated.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Ekaterina Galkina wrote:I'm not sure that I chose the correct branch, and the question may be stupid, but I'll try to ask.
Imagine, that we have a web-application (which opens in browser).
Java is used on server side (we have an application server, for example Glassfish).
Question.
Does it mean that servlets (or jsp) are neceessarily used? Or is there another way to generate html pages? (The problem is that I've heard about many technologies, like ejb and others, but didn't use them).
You may want to have a look at JSF 2. It's a great specification that builds on servlets but doesn't require you to write them yourself. It's somehow like jsp but with a rather different approach. It's a component based framework and uses facelets for templating. If you need a hand with this, just pm me.
| If you want to look young and thin, hang around old, fat people. Or this tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |










