Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old October 2nd, 2002, 10:55 AM
Messner's Avatar
Messner Messner is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Slovenia
Posts: 29 Messner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 10 sec
Reputation Power: 0
Send a message via ICQ to Messner
How to start with java on the web

I am totaly new to java. My first web language is PHP and I think, that I am good at it

But ... now that I have finished some PHP projects I am getting sick of it.

It was fun on the start, but when my web's grow, then it isn't fun anymore. I have to write some things over and over again. It is very hard to find errors in such php webs ... If you look at .php files with all those echoes and stuff, you cant figure anything out. PHP is good for small pages (OK, you can also write big ones, but you risk a headache).

So what I am looking for is a language that is capable of separating code from design, possibly object oriented and open source.

I think that java fits here. Where should I start ?

If I got it correctly then JSP-s are almost the same as PHP ...

What should I use then ? I hear a lot about EJB an servlets. Do they give me what I want ? Do I need JBOSS ?

What is the difference between EJB and servlets ?

Do servlets use JSP ?

What are JDO, and OJB ?

Reply With Quote
  #2  
Old October 2nd, 2002, 02:52 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Well, for starters, you can do OOP with PHP

Now for some definitions:
Servlet: Basic java web component. Functionally similar to a cgi script (think PERL).

JSP: An easier way to write servlets. Syntactically similar to PHP, JSP pages are first transformed into servlets, then compiled into byte code.

EJB: An alternative way to utilize a data source. An EJB provides an OO wrapper for data access. It handles its own storage and retrieval from a data source.

JDO: Don't know much about it. It appears to be an alternative to JDBC (SQL), and to compliment EJB's.

OJB: No clue


I think you'll need JBoss if you plan to work with EJBs, but you don't have to use EJBs for data access. They might even be a bit much depending on your application.

Reply With Quote
  #3  
Old October 3rd, 2002, 03:12 AM
Messner's Avatar
Messner Messner is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Slovenia
Posts: 29 Messner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 10 sec
Reputation Power: 0
Send a message via ICQ to Messner
Still without an answer ;(

Quote:
Well, for starters, you can do OOP with PHP
I am using it allready, but it is practically the same. I need some objects that are outside "the page", so they don't mess with my design and so the code and design aren't in the same file..

The various template stuff is also only a shortcut to my goal.
Quote:
Servlet: Basic java web component. Functionally similar to a cgi script (think PERL).
I don't like that eather, because it is only the other way - you dont stuff code in the design page, you stuf the design in the code page. You do those writeln's instead of echoes.

I need an object that lives in the server, without to be caled from the link (something.php) ...
Quote:
JSP: An easier way to write servlets. Syntactically similar to PHP ...
I don't get what I want here .... it's basicaly the same as PHP in the concept ...
Quote:
EJB: An alternative way to utilize a data source. An EJB provides an OO wrapper for data access. It handles its own storage and retrieval from a data source.
I don't get this
Is this what am I looking for ?

Reply With Quote
  #4  
Old October 3rd, 2002, 02:47 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
EJBs would probably do what you're looking for. It sounds to me like what you're needing is more of a JavaBean or taglib.

JavaBeans usually contain business logic. You can use tags to get and set properties, or use code to call methods directly. The can be scoped to the page, the request, the session, or the application.

Taglibs are (basically) a way to encapsulate the passing of parameters to an include. Kind of like function calls that don't return values.

You could also just use plain old java objects. The disadvantages of these over javabeans is that you can't get and set properties through tags, and if you want to scope them to the session or application you have to do it explicity.

You can duplicate the last option in php, though. Put your class definition in a seperate file, say "UserClass.php", the in your page you just include( "UserClass.php" );, the instantiate an object: user = new User();

Keeps your objects seperate from your design (at least for file structure).

Reply With Quote
  #5  
Old October 4th, 2002, 03:33 PM
Messner's Avatar
Messner Messner is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Slovenia
Posts: 29 Messner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 10 sec
Reputation Power: 0
Send a message via ICQ to Messner
Quote:
EJBs would probably do what you're looking for.
Thx

I wasn't sure where to start and if it is worth the learning ...

I'll download JBOSS and start learning ...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > How to start with java on the web


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway