Forum Moderators: phranque
Sorry! Its a bit of long one:
I currently use plenty of HTML & SQL & ASP for my work intranet. (in my degree I did basic webdesign/C++/Perl) I'm thinking about starting to code my next dynamic page with JSP probably via Dreamweaver MX. Some of the things I've been thinking about:
- My final module in Feb 2003 for my masters university degree will be Java & I thought maybe familiarising myself with JSP would help considerably.
- The co I work for is using more Linux & we may well switch to Apache soon. If I wrote my future intranet & apps in JSP I could just transfer them unlike ASP? (or it'd be easier to)
- Tomcat would enable me to continue the current site with IIS & ASP but also allow JSP
- Some of my colleagues use dialup modems or mobile phones to connect to the work network & have complained about speed issues. I've heard JSP is quicker than ASP & places less of a strain on the server as ASP holds open a session for ages & is continuously reading from the server.
(current server is a Win 2k, P3,lots of ram & large drive but as well as hosting the intranet has a web app on it that uses cut down version of MSDE SQL server that retrieves data from a huge Oracle database on a unix server & posts data into access. This is used by anywhere up to 80 people to query & insert data from 4 different office sites)
- Other people have mentioned PHP,Perl-CGI,ColdFusion
* Co don't want to use cold fusion, I've heard PHP i sgreat but procedural & lastly of course it'd be alot easier to continue with ASP...
Any thoughts or advice would be greatly appreciated.
Thanks
Graham
Some of my colleagues use dialup modems or mobile phones to connect to the work network & have complained about speed issues. I've heard JSP is quicker than ASP & places less of a strain on the server as ASP holds open a session for ages & is continuously reading from the server.
Session timeout period is controllable via code, and as for the dialup user delays the only real speed issues will be;
1) Badly coded scripts or badly designed pages.
2) Slow-running components (modules, add-ins, databases etc)
3) Large pages
None of which will really be solved by changing languages.
ASP doesn't read from the server any more than any other language, but as always it depends on what you are doing - if they pages don't change then IIS will attempt to re-use a cached copy, equally Windows disk cache will reduce the amount of reads required if the pages request a resource which hasn't changed.
From the sound of it your problems could be caused by the database - if it were me I'd talk directly to the Oracle db using ADO, having every database operation have to go through various conversions will slow it down.
If it were me I'd stick with ASP if possible, however if that wasn't an option I'd opt for PHP because I put that a small step above ASP/JSP.
- Tony
What are your thoughts on JSP helping me with my not too distanet future Java course... or doesn't really warrant my switch?
Also its likely that we'll have a Linux Apache server soon so JSP would be more portable.. though PHP would be too
Whats ADO - is it similar to ODBC?
Cheers!
You can use it in conjunction with ODBC DSN connections if you want to, although it's more commonly used in what's called DSN-less connections which are more code friendly as the entire connection is defined in the code rather than just having the code point to a DSN which cannot be edited as easily.
If you want to look to the way forward then you have a couple of options - JSP might be portable but not my area of expertise I'm afraid. I'm not sure how close JSP is to JAVA, but also I'm not sure if the technologies/interfaces cover common ground due to the nature of JSP (being server-side) and JAVA (being a more traditional language which can be used on both server-side and client-side).
Have you considered getting hold of Win32 Apache and running PHP from that? That way you should end up with at least the same level of portability as you would with JSP when you move to Linux Apache.
Also I'd consider the possibilites that knowing both PHP and ASP present since the majority of sites seem to run one or the other. If they run JSP you could chime in with the I-know-JAVA-and-can-crosstrain-quickly card which is always a plus.
- Tony
I agree with the points Dreamquick has made - being primarily a java programmer I can give you my 2p worth on that side:
familiarising myself with JSP would help considerably
I would strongly advise you to fire up a text editor and create and compile your own components for your JSP pages, don't rely on an IDE to embed other peoples' components for you. You'll learn much more this way. I still do all my web app building with a text editor and command line compiling. You'll also feel much more confident with it when you know whats going on 'under the hood' so to speak. If you want to switch to an IDE later then you'll pick it up in no time.
JSP I could just transfer them
Tomcat would enable me to continue the current site with IIS & ASP but also allow JSP
Also, if the tomcat mailing list is anything to go by, getting tomcat to run on windows properly as a service can be a bit of a nightmare. Its pretty easy to set up on linux/apache although the documentation isn't that great. The tomcat mailing list will be your friend here.
I've heard JSP is quicker than ASP
A couple more things maybe worth mentioning -
where do want to be when you finish your masters?
Java is generally used for large enterprise projects. Most of the jobs I see advertised in my area are for working in the financial industry in London (city). I know that wouldn't suit me.
Small to medium companies will more likely be using ASP or PHP I expect.
For running your own projects you'll find a lot more hosts offering ASP or PHP support than you will supporting java. You will find hosts that support java, but you'll have less to choose from.
I hope this helps you. Of course its all MHO and I'm not your typical java web programmer. I work on a small site and I use java/JSP mainly because I know it better than anything else :-)
Feel free to sticky me if you like should you have any java related questions, I'll do my best.
I'm 99% sure that you can't pass data (like session variables say) between the two, so you couldn't build a web app out of a mixture of both.
I'm 100% sure you can't combine the two. I had a situation where I was hoping to combine and it wouldn't work at all.
ASP runs on IIS and the JSP ran on TOMCAT. On the same machine they needed to be differentiated by port, so anything routed into the JSP port was treated as Tomcat and couldn't compile the ASP.
You can do remarkable things in both, but I wouldn't mix the technologies. There's no reason to.
I've heard PHP i sgreat but procedural
I recently converted a several thousand line PHP app from procedural to OO without switching languages. I'm not absolutely certain, but I think I made it shorter in the process. I certainly made it easier to read. I'll benchmark the two against eachother soon. Objects and classes don't give me the same 'grafted-on' feel that they do in Perl.
The two things that bother me in principle about OO in PHP are that (1) constructors aren't inherited (well, they are, but as plain old methods, not constructors) and (2) apparently inherited methods are notably slower to call than ones defined in the sub class.
If you already know Java, or are going to have to learn it soon, though, I'd go with that. I'm a PHP addict 'cause it's what I learned first for the problem space, and it does the job well enough that I haven't felt compelled to learn something else for the same niche.
THANKS LOADS FOR EVERYONES ADVICE - IT WAS GREAT!
Think I'll continue with ASP for some basic intranet & minor web apps but also set up Apache & do a JSP project.
: )
Cheers
Graham