• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need advice on java web technologies

 
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm beginning a new open source project that will essentially be a bundled, integrated, small business solution including e-commerce, CRM, Sales, Accounting, Inventory, and more.

I am a 4-year C#/ASP.NET developer and am very familiar w/ building enterprise-class web apps using those technologies.

I want to use Java because of it's open nature and friendliness toward open source platforms such as Linux (and Java is just a great technology!). I'm still new to Java and J2EE technologies so I was hoping someone here could point me in the right direction.

What I'd like someone to describe to me is the best Java/J2EE alternatives to what I'm used to, which is simple, straightforward, and powerful (ASP.NET).

I've found, through research, that there is a LOT of overlap in the Java world and several different ways to do something so I'm just trying to clarify the best *simple* (yet powerful, fast, scalable) approach for building Java-based web apps.

I don't want much do I?

Please don't let this dissolve into a "Java rules, .NET droolz" flame-a-thon, please remain objective and practical, lets keep our heads here.

Here are some questions...

1. In ASP.NET all presentation-level page tags are xml-esque and cleanly separate presentation markup from any client or mid-tier level code. In Java, would I use JSTL and tag-libraries to achieve this? Doesn't Apache struts do this as well? Which is better? Are there others?

2. Are servlets really necessary? C'mon...really? I could probably think of some ways to use them but that's forcing it where I really can't see a *need* to use them...not yet anyways.

3. Can I get connection-pooling and transaction support through JDBC rather than using EJB? I'll be very clear right now, I'm avoiding EJB - I've concluded that it causes more problems than it solves, for this project anyhow.

4. Is EJB the only thing forcing me to use a specialized application server (jboss, weblogic, websphere, etc.) In other words, if I skip EJB, can I just use tomcat or something simple to serve JSPs and Servlets? What else would I be missing out on?

5. Deployment: If I use POJOs and JSPs, can't I theoretically just copy & paste a web application to deploy it as opposed to registering objects or whatever else comes along with using high-end J2EE technologies (EJB, etc.)?

6. What are some simple, easy to use, easy to deploy open source code-frameworks that will actually make my life easier? I've heard of Spring and Hibernate but am nearly entirely unfamiliar with how they are relevant. Their literature describes them as "simple frameworks" but how useful are they, *really*? I'm not really interested in AOP or SOA at all at this point...they seem more like marketing fluff in my mind and I'd rather skip all that jazz until they pick up in popularity or somehow begin to appear useful to me.

7. Is JDO easier than JDBC? Is it "better"? Which is more standard, JDBC?

8. Ant, WARs, EARs, and JARs: Confuse me a little...to say the least. How is Ant relevant to a simple application I'd like to just package and distribute (without a ton of installation steps, hopefully just copy & paste)? Why use a WAR file? Is it just a zip file in Java-land? Are EAR files only used in JBoss? Can a Java web app be rolled up as a JAR? Should it?

9. Is a JavaBean a POJO? If I use the POJO approach for middleware, am I creating "JavaBeans"?

10. ASP.NET uses events to process user input and other "actions"...how can I do this in JSP/Servlets? Is it even possible? I'd like my pages to be as object-oriented as possible and that's exactly what you get in ASP.NET, every page is actually a class.

11. J2EE 1.5 (5.0): When will this happen? Will EJB 3.0 be *that* much better than the current version? I hear it will be POJO-like instead of EJB-like I'm really impressed with Java 5.0...and I'd like to use it...but I'm wondering if there will be conflicts using current Java web technolgies that may not be 5.0 "compliant".

What it all boils down to is I really, really *want* to like J2EE web development because I'm already sold on Swing and Java as a language, even after using C# for years now. Swing is just *awesome* (Java 5.0 anyways) but Java web technologies appear, to an outsider, to be an incredible kluge and a never-ending maze of disparate technologies.

I'm not putting J2EE down, but I just tried to simply deploy a JBoss-based J2EE web app and I've been at it for days with no success, even after following the directions, step-by-step.

I'm used to developing something and simply copying it to a server to run it so this seems unecessarily complicated to me.

Thanks for your patience and all of your help!!

-v
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A 4 year C#/ASP.Net veteran!? My, you must have been quick off the mark...

You have some questions, I'm feeling talkative so here are some answers:
1. Its personal choice really. Struts is just a set of custom taglibs. I'm sure there are more. Given your background you might want to consider Java Server Faces - which many people find easier to use than Struts etc. ASP.NET's WebControls are pretty much identical in behaviour to tag libraries.
2. Yes. JSP is just a scripting language which genrates servlets. Custom tags are the same. There may be no reason to write them explicity, but all Java web apps use them implicitly.
3. You can get open source connection pooling implementations; JDBC doesn't include an implementation. JDBC includes transaction support for Database operations. If you need transactions for more than that you'll need to use JTA, for which you'll need a Transaction Manager. Transaction Managers come with containers true, but you don't need EJB to use JTA.
4. Yes. Without EJB, the need for an app server decreases considerably.
5. Depends on what container you are using. Tomcat - you just drop your applciation into the deploy directory. Weblogic and JBoss are the same. (caveat: assuming you have correctly specified any deployment file you need) WebSphere is a more complicated beast.
6. Hibernate is very useful. For any persistance needs - you'd be well advised to look at it (or if you prefer som other ORM layer). Spring sounds like it may be something you could find use for - since it is basically best summed up as "J2EE without an app server".
7. Writing reusable JDBC frameworks is not a trivial task. Which is why there are so many open source implementations for people to reuse. JDO is "standard". Whether it survives into the future is perhaps questionable.
8. Ant is invaluable. One of the places J2EE really fails when compared to MS's newer offerings (I have deployed complex Windows DNA apps before, and that is just a nightmare - but .NET is much, much better). Getting used to using it early is a good idea. IDE's will do its work for you, but Ant is much easier to take from one environment to another. WARs, JARs, EARs are effectively the same things. They are named differently only to highlight what purpose they serve.
9. Strictly, no. "JavaBeans" are a much older technology used specifically to create components used in GUI building. The term "Java Bean" in the context of Web Apps usually just means an object with properties. Simple as that - so yes it is basically a POJO.
10. Hmm. "Actions" are just basically a part of an MVC design. Struts is a good example of an MVC based framework for web applciation building.
11. J2EE 1.5? Eventually. We'll not know how good it is till its released and widely supported by the main app server vendors, which will probably be a long way away, so don't worry about it for now.
[ October 29, 2004: Message edited by: Paul Sturrock ]
 
Bartender
Posts: 1152
20
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at the Eclipse [open source] IDE. You should be able to find plug-ins that will help with your development, for whatever technology / framework you pick. I would also recommend you to Xdoclet (used within Ant), as its tags will help to generate any required XML files.
 
Vinnie Jenks
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Sturrock:
A 4 year C#/ASP.Net veteran!? My, you must have been quick off the mark...

You have some questions, I'm feeling talkative so here are some answers:
1. Its personal choice really. Struts is just a set of custom taglibs. I'm sure there are more. Given your background you might want to consider Java Server Faces - which many people find easier to use than Struts etc. ASP.NET's WebControls are pretty much identical in behaviour to tag libraries.
2. Yes. JSP is just a scripting language which genrates servlets. Custom tags are the same. There may be no reason to write them explicity, but all Java web apps use them implicitly.
3. You can get open source connection pooling implementations; JDBC doesn't include an implementation. JDBC includes transaction support for Database operations. If you need transactions for more than that you'll need to use JTA, for which you'll need a Transaction Manager. Transaction Managers come with containers true, but you don't need EJB to use JTA.
4. Yes. Without EJB, the need for an app server decreases considerably.
5. Depends on what container you are using. Tomcat - you just drop your applciation into the deploy directory. Weblogic and JBoss are the same. (caveat: assuming you have correctly specified any deployment file you need) WebSphere is a more complicated beast.
6. Hibernate is very useful. For any persistance needs - you'd be well advised to look at it (or if you prefer som other ORM layer). Spring sounds like it may be something you could find use for - since it is basically best summed up as "J2EE without an app server".
7. Writing reusable JDBC frameworks is not a trivial task. Which is why there are so many open source implementations for people to reuse. JDO is "standard". Whether it survives into the future is perhaps questionable.
8. Ant is invaluable. One of the places J2EE really fails when compared to MS's newer offerings (I have deployed complex Windows DNA apps before, and that is just a nightmare - but .NET is much, much better). Getting used to using it early is a good idea. IDE's will do its work for you, but Ant is much easier to take from one environment to another. WARs, JARs, EARs are effectively the same things. They are named differently only to highlight what purpose they serve.
9. Strictly, no. "JavaBeans" are a much older technology used specifically to create components used in GUI building. The term "Java Bean" in the context of Web Apps usually just means an object with properties. Simple as that - so yes it is basically a POJO.
10. Hmm. "Actions" are just basically a part of an MVC design. Struts is a good example of an MVC based framework for web applciation building.
11. J2EE 1.5? Eventually. We'll not know how good it is till its released and widely supported by the main app server vendors, which will probably be a long way away, so don't worry about it for now.

[ October 29, 2004: Message edited by: Paul Sturrock ]




Actually yes, I had been using MS technologies (ASP, COM, DCOM, etc.) since 97 and was quite excited when "asp+" was announced. I tinkered heavily with C# when the betas came out and got as familiar as possible, as quick as possible, C# is a pretty cool language. I've been using it commercially, as a consultant, to make a living since 2001. I love it, I REALLY do, but Mono isn't mature and probably won't be for some time. Windows Forms are useless to me because I can make cross-platform, native-looking applications with Swing, WF allow me to write Windows apps for 2000 or XP only...fuggedaboutit!

Anyhow, thanks very much for the info...now I have a little more direction.

There certainly is a lot chew on in the Java world...I guess that's what made .NET so appealing, though it lacks the flexibility that Java/J2EE offers.

Thanks again!
 
Do not set lab on fire. Or this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic