User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 402,021 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,436 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting

Help for learnign JSP

Join Date: Oct 2006
Location: somewhere in West-Africa
Posts: 196
Reputation: jamello is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Junior Poster

Re: Help for learnign JSP

  #12  
Apr 18th, 2007
WOW! WOW!! WOW!!!
rgTaylor, That was something else . Thanks a great deal and that was a lot to think about.

What is

Originally Posted by rgtaylor View Post
I use ASP/ASP.Net and VBA at work from time to time... more often than I would like to be honest... What you have to realize is that VB (Visual Basic) was Microsoft's way of reviving the BASIC lanuage and making it available to use for manipulating the visual components on the screen... it was a cheap and easy way for them to add a scripting langauge to Windows which didn't really exist prior.

Prior to that, most scripting in Windows was done with DOS .bat files... but the limitations in the design of DOS and the fact it usually required a DOS window was an issue. Meanwhile Unix and Linux had robust shell scripting which didn't actually require shell windows at all...
Later they adapted VB for a server side scripting langauge creating VBS as a subset of VB... to help differeniate as people became confused by the differences, they relabeled VB into VBA...
Visual Basic for Applications
Visual Basic for Scripting

They released the .Net framework following in the wake of the STL from C/C++ and even the JSTL in Java... thegeneral concept was to create a single function call that would require more parameters at once, but could do the functionality that previously required several function calls... Also by providing this library to be able to interact with various programming langugaes they could "lock" people into MS...
Unfortunately, this also removes your control on the performance, etc. of the applications that use .Net... However, for beginners it made things easier, as you don't have to go through 6 steps to connect to a database.... 1 call is enough... BUT gehind the scenes it is still take the same steps... MS labeled this "Chunky" programing.... the use of many parameters in 1 function call over making several function calls with a few parameters each...

So in Java you might have to declare a set of strings with the DB connection information, including driver class, etc... Then you have call the class loader to load the driver for the JDBC... then you have create a DB connection using the driver and the connection parameters... this is 1 step in .Net...

In Java you have to create a SQL statement object or a PreparedStatement object... Java recommedns ALWAYS using the prepared statement for security reasons...
The you set the parameters of the prepared statement and then you execut the query and store the results in ResultSet object.... Again, in .Net that is all 1 step.... BUT .Net doesn't really handle the prepared statement method... see the prepared statement allows JAVA to plug in the values you requires for SQL... it will escape, quote etc. as is appropriate for each data type, it checks the data types carefully, etc.. so you can't try to hack iy by typical DB embeded selects etc. methods... I don't want to give hacking tips here, so I won't go into detail... but Java will catch that and escape it... so it will be harmless text by the time it reaches your DB.... this is why Java recommends the use of the prepared statement ALWAYS... In fact, in newer JDBC it is ALWAYS and prepared statement internally anyway... so there is no real performance difference etc. in not using a prepared statement... so err on the security side...
.Net doesn't do that, as far as I know...

In .Net you can build objects and store them on the server and use these objects much like beans, but they are much more complex to use and actually significantly slower...

Also, MS IIS is the worst web server in the world... My son could code a better performing server... in production environments, and I know this because I worked for many years in a leading Enterprise Solutions Company which used MS Servers almost exclusively... IIS performance begins to drop significantly after about 200 concurrent users... between 300 to 400 the drop is exponential and IIS pretty much falls over around 400 concurrent users... So when customers used one of our Java based solutions, they could have many more users, several times as many, users active with each server in the cluster, but if they used one of our MS IIS based solutions they woudl have to buy a great deal more hardward, cluster several times as many servers just to do the same job....
And .Net works primarily with ODBC, it is notimpossible to use other systems, but it is tricky at best, and it works best with MS SQL Server.... the industry experts, of which I AM one, will tell you that SQL Server is NOT an Enterprise class Database... If we use SQL Server we had to use several machines where using Oracle, etc. we could use just 1...
Case in Point, SQL server suffers from deadlocks in their DB frequently while the same DB schema will not have any trouble on most other systems... deadlock will cause seriously slowing of the SQL server if they happen only intermittently, and will crash the server, without any sign, if they happen frequently... I say without any sign, because the server application is still running, but it will "freeze" it will be completely non-responsive...

As far as I know there is NO way in VB.Net to forward a request to another page without the user getting a forward notice... Also, Java/JSP can query other sites in the background, including POST and GET data in the query and return the results, process them if needed and include the results as-is or after processing into the output from the page... I built a special library of functions in PHP several years ago to simulate this, but it is native to Java... But forwarding the Java way is only in Java as far as I know...

Now as far as I know VB scope in an IIS server is limited to transaction and session... anything more and you must build it yourself, typically using some kind of database or in-memory work around... which is just really using session scope with extra parameters to simulate page or request scope.... though I think for application scope you have to rely on a DB workaround... a lot of work for something Java does Naturally...

Now, I may be wrong about some of these comments regarding .Net's most recent capabilities... I have pushed my people to avoid using VB and VB.Net as much as possible, but we do have some projects where .Net was the only choice... simply because we were adapting code already written in .Net...
But we all really hate workingin .Net...
Remember, one-size-fits-all solutions are not really realistic... I think we all know that... so why would we agree to use a .Net framework where the same code is then used with VB, C++, etc.... one-size-fits-all code is crap... Borlund did that with their "Builder" applications... ALL of the builder applications used the Borland Delphi library of objects... SO C++ Builder would pass function calls from you C++ code to Delphi objects and pass the return values to you C++ code... the limitation in the Delphi language caused issues with how/what you code using this architecture... because one-size-DOES-NOT-fit-all.... The .Net framework is exactly the same...

Long but helpful, I hope ;-)
Peace,
For the record I am Co-Founder, CEO and President of an IT Consulting and Services company... My background is in System design and architecture and business process consulting and design. I spent many years working for some of the largest Enterprise Solutions companies in the world and when the biggests named companies in the IT industry had problems, questions or concerns, they came to me for answers... I am not flawless, but I do know what I am talking about ;-)
Reply With Quote  
All times are GMT -4. The time now is 10:07 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC