«Home

Java Server Pages (jsp) Or Java Server Face(jsf Which Path To Trend? ? ? ?

My first title for this topic was actually "Java Server Faces a result of misguided competition", but the fear of been misinterpreted by other Java colleagues (I belong to JAND if u must know), made me change the topic at the last moment.

I used to understand than when developing dynamiv/interactive web applications(database driven web applications i mean), Java tries to enforce the advantage of seperating presentation logic from Business logic(Programming codes) hence leaving the presentation part of the web application to the Web/Graphic Designers to create and restrict themselves with interracting with the java beans made available to them. While, the Java developer team creates reusable bean components and deal with issues such as database access, information retrieval, updates etc.

Then(before JSF came into place), when i had a web application job, I used my Macromedia Suites (Dreamweaver, FireWorks and Flash) to create my Front end,  then I create the Bean components + the Servlet(for controlling the navigation/forwarding/central control). Then Gbam! my web application is rolling.

But, with the introduction of Visual Web development from within netbeans and Sun Java studio centre, It seems Java want to be used for designing presentation as well. But the question(and reason for my new thread) is this, "Can Java(Netbeans IDE,etc)  compete with other proven technologies such as Macromedia Suite(specifically Dreamweaver, Fireworks) , Adobe, and Microsoft Web Expressions , which are very productive for developing the presentation part of Web applications?"?? "My answer is an emphatic No?".

I think, Java and I mean Sun should concentrate in what it knows best developing Business Logic, (It is painful/disturbing to know that Web pages designed thru d web designer in Sun cannot be opened by other suites, which is not so for the other suites.) So, if Netbeans/Sun wants to compete with proven web design technologies, then they need to step up their GAME!!! .  Meanwhile, I'll just continue to do my thing the Good Good Way. And maybe completely ignore Java Server Faces(JSFs).

Comments are welcomed from the Java Community, and the programming community as whole. Remember no hating, Just share ur ideas/views.

Proud to be a JAND(Java Nigerian Developers),  Want to Join,

Avatar
Newbie
49 answers

I think we need a moderator for the programming section. I am tired of people hyjacking threads. This thread was supposed to be about jsp and jsf and then unrelated stuff started cropping up.

I am not against posting of code but people should try to stick to what the thread is all about. If you have something different to say why not open a new thread. It doesnt get easier than that

0
Avatar
Newbie

@sbucareer

LOL.

Never even knew there was a problem that needed soln in the first place. Its hard to follow the topic. Would have tried on it though. Advise, start a new thread for this, and I promise to try and follow and solve questions.

0
Avatar
Newbie

Look at them, they have all chickened out. Teach me Java, teach me to program. I am this and that simple delete function no one could even try to complete it. I am very disappointed.

Go on; learn needlework, programming is NOT for everybody the sooner you get it the better for you. Chickens!!! Quak! Quak!! Quak!!!

0
Avatar
Newbie

@sbucareer

Promise u i'll look into a solution for it. Internship as been so busy and almost sucking my heads off. The "mail sent stuff', how far "journey"

0
Avatar
Newbie

Nobody has come up with solutions for the delete button and clear button. What a programmers indeed?

0
Avatar
Newbie

@sbucareer

Yes, I was talking about ur quote earlier on when u said I should re-MODIFY my code. But never mind.

@logica

I think u are right. May be we should start a new topic on this, and then sbucareer can teach/explain the concepts of Desktop to beginning Java Programmer. Posting it here is actually truly MISLEADING, but really No one is really HURT.!!!

@sayhi2ay

Try and go through the concepts of Scope very very well. Seems u have misunderstood it.

private variables/methods - can only be accessed within the class they are declared.

protected variables - can only be accessed by classes that inherit the class(i.e subclass) and classes in the same package

package acess - this is the default when u don't specify anythin, - can only be accessed by Classes in the same PACKAGE.

public - can be accessed by all.

Hope u Understand better.

0
Avatar
Newbie

what's all this crap? did somebody miss the intended thread?

0
Avatar
Newbie

hey! have you seen the source code of inbuilt methods?

0
Avatar
Newbie

when you declare a variable as private, it would never be inherited by its children, ok, unless you play some other tricks, not trying to be funny, do u get what am trying to say ?

if you have a daddy class, then variables last name, first name, sex, address, age and so on, dont need to be declared again in the son class right? you can just inherit all the declarations by using son() extends daddy(), disregard the format, which is not complicatedly possible by used 'protected'

0
Avatar
Newbie

candylips, we are coming to it, I was trying to demonstrate desktop application development by request. Later we can see how we could use XML with JSF on desktop application development to modify MobilePhoneApplication software above.

Do you stay @ Eltham?

0
Avatar
Newbie

Oh no i thought we were speaking JSF and JSP here . it will be nice if we stick to the topic

@mydevbox

Majority of the JSF components i see out there are just JSP taglib clones.

I was hoping JSF was going to give us a visual studio style programming model.

Not some Ajax enabled components for things like table rendering, autocompletion and things like this.

I hope the technology keeps improving though. . . . but for now i'm gonna be sticking with good ol jsp and velocity templetes

0
Avatar
Newbie

I seriously do not understand that statement

0
Avatar
Newbie

exactly, if you keep declaring them as privates, then we will never get to inherit anything right ?

0
Avatar
Newbie

You do not extend attributes of any class in Java instead you inherit the public attributes and methods of a super class or protected methods and attributes of the same class package.

private attributes makes your variable immutable by any inquiring accessor, you only expose them by using callbacks.Java calls them setter and getter, i.e let take a variable int qty

//callbacks

int getQty(){return qty;}

void setQty (int qty) {this.qty = qty;}

their first name must start with set for mutable and get immutable

0
Avatar
Newbie

But I have given you a head start here

0
Avatar
Newbie

if you are extending the attributes of a class to another class in the same code ? you are just calling a method in the code you wrote,

0
Avatar
Newbie

and if you want to extend classes or methods in the same code ?

0
Avatar
Newbie

sayhi2ay

You can always use a callback methods. That is the whole point of it, to stop your code looking like spaghetti.

Remember software cohession. Sorry, I am used to software developing to programming.

0
Avatar
Newbie

java genius!

if you keep privatizing all your declarations, then we wont be able to extend your classes and methods,

0
Avatar
Newbie

sbu Have done has u sent.

0
Avatar
Newbie

I have explained it above. How to create a pacakge.

0
Avatar
Newbie

I cant run the applet I used IE and Mozzila, am I missing something though I got an exception stating that the runtime could not locate the class file

Note: I have downloaded the class, this are the errors. Please be patient with me.

Java Plug-in 1.6.0_05

Using JRE version 1.6.0_05 Java HotSpot(TM) Client VM

User home directory = C:\Documents and Settings\Administrator

----------------------------------------------------

c: clear console window

f: finalize objects on finalization queue

g: garbage collect

h: display this help message

l: dump classloader list

m: print memory usage

o: trigger logging

p: reload proxy configuration

q: hide console

r: reload policy configuration

s: dump system and deployment properties

t: dump thread list

v: dump thread stack

x: clear classloader cache

0-5: set trace level to <n>

----------------------------------------------------

load: class MobilePhoneApplicationGUI.class not found.

java.lang.ClassNotFoundException: MobilePhoneApplicationGUI.class

at sun.applet.AppletClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadCode(Unknown Source)

at sun.applet.AppletPanel.createApplet(Unknown Source)

at sun.plugin.AppletViewer.createApplet(Unknown Source)

at sun.applet.AppletPanel.runLoader(Unknown Source)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

0
Avatar
Newbie

Here is the bytecode and a HTML file to run with AppletViwer

0
Avatar
Newbie

malone5923,

Asfar as I know all the current codes above are fully debugged and fully functional. Copy and paste it in a text editor like Notepad or WordPad and save them as .java respectively and run.

0
Avatar
Newbie

without an "access specifier",

anyways, its just programming style, nothing to it , you can always put "private" so people would know you really want it private,

0
Avatar
Newbie

sayhi2ay

Ok, you have learned that yeah, and certain that a variable declared without an identifier is automatically declared private by the JVM. Thank you sayhi2ay for that info.

But remember, it is recommended to physical write and identifier to a variable to guarantee that its behaviour will remain consistant to the written program.

0
Avatar
Newbie

In the MobilePhoneApplicationGUI class we have a method called actionPerformed(ActionEvent event) This is because any class that implements an interface promises to implement it supplied method.

In our case, we implemented ActionListener class. Its supplied a method called actionPerformed (ActionEvent e), so we must implement it ourselfs. for help consult Java API

This message is for our method in the MobilePhoneApplicationGUI. So you can copy the method and paste it over the one above.

public void actionPerformed (ActionEvent e){

}//End actionPerformed

0
Avatar
Newbie

automatically private!, try it yourself,

0
Avatar
Newbie

Yes. TestCase in a different package.

0
Avatar
Newbie

a testcase class also in a different package ?

0
Avatar
Newbie

sayhi2ay

They are by default public identifier, try it yourself. Write a class in a pacakge and another class in a different package and create a TestCase class and try to access the attributes of each identifier without private clause.

Another reason is to make sure that JVM during the runtime encapsulation associate an attribute with its appropriate identifier.

Tell us your answer.

0
Avatar
Newbie

is variable declaration not automatically private ? why do we need to put private in front ?

0
Avatar
Newbie

With a bit of luck, we are trying to model something like this. I hope people contribute their own ideas.

I am not going to comment the above code too heavily so you can figure out what is happening. 

Warning

The code might be full of Bugs, debug as you can to get it working. Don't post comments back here that you cannot debug

0
Avatar
Newbie

What I mean is, the view components of JSF are more often implemented as JSPs. How can they then be competitors? It's like saying Portlets and JSPs are competitors, or Struts and JSPs are competitors.

Check this article out if in doubt:

http://www.javaworld.com/javaworld/jw-12-2004/jw-1213-jsf.html

Or simply go to google and do a search using the 2 terms "JSF" and "JSP". I'm sure you will find enough articles on their relationship.

As a matter of fact, the official page of JSF is here:

http://java.sun.com/javaee/javaserverfaces/overview.html

And I quote directly from the home page:

JavaServer Faces technology includes:

* A set of APIs for representing UI components and managing their state, handling events and input validation, defining page navigation, and supporting internationalization and accessibility.

* A JavaServer Pages (JSP) custom tag library for expressing a JavaServer Faces interface within a JSP page.

0
Avatar
Newbie

@javaprince

Hey, I kinda fink dis post was targeted at sbucareer. Nywayz, now his email is available u cld learn more from him. Rily wat logica is askin is on wat basis do u call urself a javaprince wen u make a post like dis (kiddin)? Personally, I perceive u ‘ve got a thirst for knowledge and it is important in ur chosen career path. If u rily like desktop java dev. den I would suggest u checkout dis projects:

Eclipse RCP development using SWT- (for me, nothing compares to dis for java desktop development. Fine I understand Netbeans has support for RCP. Though u mite not be able to achieve d snazzy effects possible with Swing)

Pivot (it’s the new toolkit on the block)

Spring RCP- recently had a release

For advance java technologies I don’t fink u wld get dem in books. U find dem flying around the blogosphere, forums, wiki’s etc.

@candylips

Have u tried Sun’s implementation. Commentaries point to it being very stable, perhaps the best. Not had any serious challenges with it. Not taking anytng away from apache myfaces. And as per availability of components , I must say there are plenty. Try checking out jboss richfaces, Woodstock, commercial icefaces, cant remember some now.

@logica

Who says JSF is built on jsp technology. Wat do u mean by technology here? JSF is certainly a component based presentation framework, based on xml and with built-in support for component lifecycle management. To a large extent JSP and JSF are competing techs. Pliz, note dat JSF displays aint JSP’s coz JSP’s are actually compiled to servlet , for JSF, views are not compiled but rather parsed. No compiler is required.

0
Avatar
Newbie

JSF has not lived up to its initial promise. I have used Myfaces which is probably the only stable JSF implementation and getting it to work is a nightmare. Although after the initial sting it is quite good.

My main problem with JSF is that it promised a lot but has delivered ver little. It promised the abundance of off the shelf componenets just like we have in .NET but this has not happend. There are just a couple of componenets out there with still very difficult configuration mechanism.

I will rather use a tested and thrusted technology like JSP with a couple of open source taglibs to get the job done. JSF still uses taglibs as well u know!!

0
Avatar
Newbie

@El

Thanks for ur contribution. This thread was not meant to be an Arguement Session but an Enlightenment Session. I don't know how many times I got to say this, but I was refering to Visual JSF for creating/designing Pages(RAD using NEtbeans tools) as compared to Macromedia Suites and Web Expressions, Visula Studio IDE.

But I agree, with all u said, as Java devlopers we all have to stay up to date.

0
Avatar
Newbie

There's really no basis for comparism. JSF is an improvement on traditional JSP.It uses an MVP (model/view/presentation) architecture.that means MVP rolled up in a single page. Try and stay up to date as technology changes, else u'll be left in the medieval age.If u are a java developer, u need to look up the technology providers and join developer networks, d benefit being, u stay on the edge.And guys instead of arguing about trifle issues, please concentrate on solving problems with your skills.

0
Avatar
Newbie

It seems Java want to be used for designing presentation as well. But the question(and reason for my new thread) is this, "Can Java(Netbeans IDE,etc) compete with other proven technologies such as Macromedia Suite(specifically Dreamweaver, Fireworks) , Adobe, and Microsoft Web Expressions , which are very productive for developing the presentation part of Web applications?"?? "My answer is an emphatic No?".

so before JSF, Java didn't have any presentation technology? Or are you saying we weren't designing JSP presentation logic using DreamWeaver for instance before JSF? What do you really think JSPs are?

If this continues and people like sbucareer proffer solutions unlike u who onle comment(for controversial purpose, OWAMBE!!!)

you are talking as if you posted a problem and asked for a solution. your thread in local parlance "no get head no get tail".

0
Avatar
Newbie

Soon be back got to do something righ now

0
Avatar
Newbie

Javaprince as you said that your strength is Desktop, Don't bother with above API, concentrate on Swing API and JSwing API

Remember, JSwing or Swing and AWT are not for Web application development, they are for Desktop development

0
Avatar
Newbie

Sorry, I just saw the modifications you made to your previous post, It wasnt much help why because as I stated earlier I don't have a Compiler to make changes to the java file. But the link worked well(I guess thats Ok). Thanks

0
Avatar
Newbie

@sbucareer

Am sorry to say, but that is the most elementary thing have seen in Java a long time. It has to do with polymorphism i.e Every String object is an Object object(no pun!!!).

So I understand that what next. If u checked your prvious 2 post, u just listed 10 items(supposed books) but we got blanks there. I really need help to learn the advanced part of Java TM technology. And am not asking u to come down to teachme, Just give me ebooks or links to sure ones I can download.

@readers

Sorry to be deviating from the subject of this Thread, but hope we all gain a lot, sbucareer is one of the best Java Men(almost said Guys) we can get.

0
Avatar
Newbie

@sbucareer

Am sorry to say, that is the most elementary thing have seen in Java a long time. It has to do with polymorphism i.e Every String object is an Object object(no pun!!!).

So I understand that what next. If u checked ur prvious 2 post, u just listed 10 items(supposed books) but we got blanks there. I really need help to learn the advanced part of Java TM technology. And am not asking u to come down to teachme, Just give me ebooks or links to sure ones I can download.

@readers

Sorry to be deviating from the subject of this Thread, but hope we all gain a lot, sbucareer is one of the best Java Men(almost said Guys) we can get.

0
Avatar
Newbie

Understand JSF real well and you will appreciate it's importance  as a Developer on the Java Platform

0
Avatar
Newbie

When I say Java is not thought in schools, I refer to the fact that there is not a central location where Java is been taught and resources been found. Even buying books over the internet is a very long process with a lot of complications of its own. Also, the various I.T training institutions in Nigeria such as NIIT, FirstLogic, Aptech are just money swindlers where at most u can just get an Introduction. So, I will like u to advise me on books I can get. And Softwares to that purpose.

Also The main reason for this topic in the first place is to point out that for most web sites requiring dynamic contents, JSP will SUFFIX!!!

0
Avatar
Newbie

SCJP - u r a Programmer not a Developer. Get it right.

0
Avatar
Newbie

so r u saying JSF pages (presentation/view) are not JSPs?

0
Avatar
Newbie
Your answer
Add image

By posting your answer, you agree to the privacy policy and terms of service.