• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

JEE Architecture..

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I'm new to JEE and building a website using it.. I read about Model View Controller... But I also heard about Spring and ETC...

What is "in" right now? And what is more efficient and easier to learn?

thanks,
Vic
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Model-View-Controller is a design pattern which mainly helps you so separate code that deals with the user interface and interaction with the user from business logic.

Spring is a framework that contains an enormous amount of functionality. Part of Spring is a framework for web applications that's based upon the MVC design pattern. I think Spring is one of the more popular frameworks, but besides Spring there are hundreds of other Java frameworks. In fact, there are so many that it's simply impossible to be an expert in all of them.

Java EE is a large thing. You can't learn it all in just a few days. If you're brand new to Java EE, I suggest starting with learning about servlets and JSPs; those are the basic building blocks that are used in Java EE to build web apps. All of the frameworks build on top of servlets.

You'll most likely also want to do things with a database. There's ofcourse the low-level JDBC API, but for real web apps you'll probably want to learn about object-relational mapping. The standard API for this in Java is JPA, the Java Persistence API. Hibernate is one of the most popular implementations of JPA.

Don't try to learn all those things at once; it will overwhelm you.
 
victor chiong
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm learning Servlets and jsp now.... Im considering the EJB next for Database ad first..(DAO). But do you mean for database, it is better to use hibernate? I am not new to database because i already new RPG programming with DB2 database... but I think am gonna use Derby
as a database for the website? What do you suggest..

thanks,
Vic
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you planning to communicate with the database in your DAOs - by using JDBC? If you're writing something that's bigger than a really simple program, you'll soon notice that the JDBC API is quite cumbersome to work with. You're probably going to have classes in your application that contain data that you want to store in the database, and you'll be writing many screens full of code to insert or retrieve the data via JDBC, copying all the fields of your data object to and from JDBC PreparedStatements and ResultSets. JPA and Hibernate help you to get rid of all that tedious work, by (semi)automatically mapping your hierarchy of data classes to your database.

You can use any database you like; Derby will work just as well as any other database.
 
victor chiong
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"How are you planning to communicate with the database in your DAOs - by using JDBC?"
I actually have no idea at first, on my book Java For RPG programmers, it say things about JDBC and ODBC and Head First Servlets and JSP talks a little about EJB...


"If you're writing something that's bigger than a really simple program, you'll soon notice that the JDBC API is quite cumbersome to work with. You're probably going to have classes in your application that contain data that you want to store in the database, and you'll be writing many screens full of code to insert or retrieve the data via JDBC, copying all the fields of your data object to and from JDBC PreparedStatements and ResultSets." --- This is what I am thinking at first, this is what I am doing in RPG....


"JPA and Hibernate help you to get rid of all that tedious work, by (semi)automatically mapping your hierarchy of data classes to your database." -- I like this one hehehe. Any books to suggest?


"You can use any database you like; Derby will work just as well as any other database." -- Okay I think i will use this one because I'm using tomcat or Tomcat + apache.. No idea yet.

Thanks,
Vic
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@victor- I think, It is better to use quote button to seperate Jesper response. so that , it will be easy to read and understand.
 
I wasn't selected to go to mars. This tiny ad got in ahead of me:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic