jsp to asp

J

josh

Hi, I'm a jsp programmer and I have changed work. My boss does not
matter about my previous
Java experience and so he told me to learn web programming using c#.

I have also many Javascript/DOM experience and I wish to program in my
"already learned mode":

In jsp I program to write Java code in .jsp page directly and I use
HTML and Javascript for client logic: e.g.

<%@ page contentType="text/html; charset=utf-8" language="java"
import="java.sql.*" errorPage="" %>
<%
Connection conn = null;

DatabaseMetaData dbmd;

String info = "";

try
{
....
%>
<html>
.......
</html>

so is there an equal c# way or what are other ways to accomplish
that ?

Thanks.
 
A

Aidy

You can use some in-line scripting but it isn't recommended.

Basically you can't come to asp.net and hope to use it like you would a
different language. It's like going to France and asking how you can speak
French but in an English way. Just forget what you know about jsp and start
from fresh with asp.net.
 
J

josh

You can use some in-line scripting but it isn't recommended.

Basically you can't come to asp.net and hope to use it like you would a
different language. It's like going to France and asking how you can speak
French but in an English way. Just forget what you know about jsp and start
from fresh with asp.net.

Oh I explain me better. I don't want to use c# as Java but I'd like to
use c# with inline code (not in the HTML tag) and I dont' want
to use visual studio that add custom tag also for html and so on...
Because I know very well HTML/Javascript/CSS I wish
to use c# for asp only for backend code and not for presentation
layer....
 
J

John Timney \(MVP\)

Although do-able, it will take you a lot longer to create code than using
the controls and the recommended approaches. You will benefit hugely from
learnign the asp.net object model and hiw it works. That won't detract from
your skills in CSS, HTML etc. as you still need these.

Take the plunge and learn from the ground up. You should have no problem
with the code as c# will appear very familiar.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
 
D

Dave Bush

Exactly!

Actually, it was a lot easier to move from JSP to ASP. But, moving from
JSP to ASP.NET just isn't going to happen.

Aidy,

Great analogy.

Programmers trying to use today's technology like they used last week's
technology is what gets programmers in big trouble. It is the main
reason why I recommend that VB6 programmers learn C# first and then go
back to VB.NET if they must.

To further push the analogy trying to code in ASP.NET like you coded in
JSP is like a 40 year old saying, "I was a teenager once." And trying
to use teen jargon. All he really ends up doing is looking like an
idiot.

Syntactically, there are some similarities. But, you aren't going to
see anything close to MVC/Struts/Model II in ASP.NET (yet... MVC/REST is
coming) so you need to learn multi-tiered architecture first and event
driven programming if you haven't already.

-----Original Message-----
From: Aidy [mailto:[email protected]]
Posted At: Friday, November 23, 2007 5:50 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: jsp to asp
Subject: Re: jsp to asp

You can use some in-line scripting but it isn't recommended.

Basically you can't come to asp.net and hope to use it like you would a
different language. It's like going to France and asking how you can
speak
French but in an English way. Just forget what you know about jsp and
start
from fresh with asp.net.

..
 
P

Peter Bromberg [C# MVP]

I have to agree with the other commenters. I've seen ASP.NET programmers that
continue to use Response.Write's to "manually" build tables and other HTML
displays instead of learning the new paradigm with the appropriate databound
control such as a GridView or Datalist, and it's a real mess - not to mention
that it makes code mucho unmaintainable for other programmers.

Take the time to learn ASP.NET , codebehind, and controls. Your jsp
experience won't hurt you. You will thanks us later.
--
--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com
 
M

Mark Rae [MVP]

Programmers trying to use today's technology like they used last week's
technology is what gets programmers in big trouble. It is the main
reason why I recommend that VB6 programmers learn C# first and then go
back to VB.NET if they must.

I couldn't agree more!

AAMOI, have you ever known anyone who made the jump to C# and then made a
conscious decision (i.e. not revenue driven) to go to VB.NET...? I certainly
haven't...
 
J

josh

Exactly!

Actually, it was a lot easier to move from JSP to ASP. But, moving from
JSP to ASP.NET just isn't going to happen.

Aidy,

Great analogy.

Programmers trying to use today's technology like they used last week's
technology is what gets programmers in big trouble. It is the main
reason why I recommend that VB6 programmers learn C# first and then go
back to VB.NET if they must.

To further push the analogy trying to code in ASP.NET like you coded in
JSP is like a 40 year old saying, "I was a teenager once." And trying
to use teen jargon. All he really ends up doing is looking like an
idiot.

Syntactically, there are some similarities. But, you aren't going to
see anything close to MVC/Struts/Model II in ASP.NET (yet... MVC/REST is
coming) so you need to learn multi-tiered architecture first and event
driven programming if you haven't already.

-----Original Message-----
From: Aidy [mailto:[email protected]]

Posted At: Friday, November 23, 2007 5:50 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: jsp to asp
Subject: Re: jsp to asp

You can use some in-line scripting but it isn't recommended.

Basically you can't come to asp.net and hope to use it like you would a
different language. It's like going to France and asking how you can
speak
French but in an English way. Just forget what you know about jsp and
start
from fresh with asp.net.

josh said:
Hi, I'm a jsp programmer and I have changed work. My boss does not
matter about my previous
Java experience and so he told me to learn web programming using c#.
I have also many Javascript/DOM experience and I wish to program in my
"already learned mode":
In jsp I program to write Java code in .jsp page directly and I use
HTML and Javascript for client logic: e.g.
<%@ page contentType="text/html; charset=utf-8" language="java"
import="java.sql.*" errorPage="" %>
<%
Connection conn = null;
DatabaseMetaData dbmd;
String info = "";

so is there an equal c# way or what are other ways to accomplish
that ?

Well, I understand that I should to use new methodologies. In fact
today Java programmers use MVC pattern
and tag libs. But however there is also a new trend. Many programmers
use many Javascript API like YUI, Prototype
ecc. and so they don't use the server side tag to render html. They
use server technologies to business logic and client technologies
(Javascript/DOM Ajax Css ecc) to presentation and behavior layer. So I
don't think that they are like old VB6 programmers ... they are only
programmers that are choosing other way to make web programming! Am I
wrong? Am I misunderstanding something? Really I don't think to be
like an idiot but only like a man that is searching a way to don't
loose his background that I assure you it is not so old...
Regards
 
C

Cowboy \(Gregory A. Beamer\)

If you ever used JSP with beans, that is closer to the ASP.NET model. If you
have placed all of your code in your JSP, you really will want to alter your
paradigm.

As far as the client side scripting goes, continue doing what you are doing.
JavaScript is still the predominant programming model and will even allow
you to program AJAX and Silverlight 1.0, although the AJAX work is much
easier with Visual Studio 2008 than hand coding.

BTW, if you have Visual Studio (including the Express SKUs), most of the UI
set up is drag and drop. To add handler, you simply double click on
controls. As such, the IDE pretty much guides your hand as you develop.

You will find that C# is similar to Java in syntax (yes, there are some
syntactical differences, but you will likely feel more comfortable than you
now think you will).

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
C

Cowboy \(Gregory A. Beamer\)

I would advise making the paradigm shift and using the standard ASP.NET
model. You can set up inline blocks, but it can get rather nasty and like
spaghetti if you are not careful.

As for the coding your own HTML, I think you will also find that is not a
wise decision. The fact you know HTML is great and will enhance the quality
of your UI. But, I see no reason to use a handsaw when you have power tools.
In like vein, I do not see hand coding HTML when drag and drop makes it so
much faster ... and richer.

In fact, I feel strongly enough about this to say I do not feel a good
employee would work slower coding by hand when he could speed things up by
using the tools. If you make conscious decisions to not use everything, that
is fine, as some rules have to be broken at times. I would not, however,
resist change simply because it is different. I believe you will find that
Visual Studio can greatly speed up your development and improve the quality
of your code ... if you let it.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
C

Cowboy \(Gregory A. Beamer\)

Dave Bush said:
Exactly!

Actually, it was a lot easier to move from JSP to ASP. But, moving from
JSP to ASP.NET just isn't going to happen.

Not as a direct move, although you can kludge things up to make it work. ;-)
Aidy,

Great analogy.

Programmers trying to use today's technology like they used last week's
technology is what gets programmers in big trouble. It is the main
reason why I recommend that VB6 programmers learn C# first and then go
back to VB.NET if they must.

Wow, that sounds like me talking. It is the exact path I took, when I
discovered I was still programming VB6 in .NET. The syntax change made the
paradigm change easier to swallow.
To further push the analogy trying to code in ASP.NET like you coded in
JSP is like a 40 year old saying, "I was a teenager once." And trying
to use teen jargon. All he really ends up doing is looking like an
idiot.
ROFL!

Syntactically, there are some similarities. But, you aren't going to
see anything close to MVC/Struts/Model II in ASP.NET (yet... MVC/REST is
coming) so you need to learn multi-tiered architecture first and event
driven programming if you haven't already.

I am anxiously awaiting the MVC release. :)

Great post.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
D

Dave Bush

To be blunt. You're wrong.

You've been trained to think you have to do everything and I think you
also believe that all web programming essentially looks the same. That
was true 5 years ago, but not today.

ASP.NET does SO much of this for you, especially now with the AJAX
libraries from Microsoft, that you really are better off just forgetting
that ASP.NET has anything to do with HTML or client/server programming
other than to keep in mind that there is a disconnect between the client
and the server.

It's great that you know that stuff, and it will certainly help you when
you debug and it may actually help you create a few new controls. But,
programming ASP.NET is a lot more like programming a windows application
than it is programming a web application. Unless you've done JSF
programming in JSP and even then, it's not the same.

You're gonna have to trust us on this one. I've programmed ASP since
1.0, JSP since 1.0, hacked as PHP a bit and now ASP.NET in CSharp and
VB.NET. I'm not bragging I just want you to understand that we know
what the heck we're talking about. I even taught ASP, JSP and ASP.NET
for 3 and a half years. I can tell you from that experience that the
biggest hurdle you are going to have to overcome is the whole idea of
event based web programming. The closest thing I know of in the JSP
world is JSF and I'm not even really sure that even that comes close
enough to what you are going to experience in ASP.NET.

Once you understand how things are done using ASP.NET, then and only
then should you pull in the other parts that you've referenced below.

That being said, assuming you've done Struts, I think you are going to
have a lot easier time understanding ASP.NET MVC/REST pattern once it
comes out than most current ASP.NET programmers because of your JSP
experience.

You might want to think about taking a class some place to get you up to
speed. There are several companies that offer one week classes in
ASP.NET that I think you'd benefit from. Of course, I'm a bit biased
now, since I use to teach at one of these places.


Dave Bush
http://blog.dmbcllc.com




-----Original Message-----
From: josh [mailto:[email protected]]
Posted At: Friday, November 23, 2007 1:28 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: jsp to asp
Subject: Re: jsp to asp

Exactly!

Actually, it was a lot easier to move from JSP to ASP. But, moving from
JSP to ASP.NET just isn't going to happen.

Aidy,

Great analogy.

Programmers trying to use today's technology like they used last week's
technology is what gets programmers in big trouble. It is the main
reason why I recommend that VB6 programmers learn C# first and then go
back to VB.NET if they must.

To further push the analogy trying to code in ASP.NET like you coded in
JSP is like a 40 year old saying, "I was a teenager once." And trying
to use teen jargon. All he really ends up doing is looking like an
idiot.

Syntactically, there are some similarities. But, you aren't going to
see anything close to MVC/Struts/Model II in ASP.NET (yet... MVC/REST is
coming) so you need to learn multi-tiered architecture first and event
driven programming if you haven't already.

-----Original Message-----
From: Aidy [mailto:[email protected]]

Posted At: Friday, November 23, 2007 5:50 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: jsp to asp
Subject: Re: jsp to asp

You can use some in-line scripting but it isn't recommended.

Basically you can't come to asp.net and hope to use it like you would a
different language. It's like going to France and asking how you can
speak
French but in an English way. Just forget what you know about jsp and
start
from fresh with asp.net.

s.com..
.
Hi, I'm a jsp programmer and I have changed work. My boss does not
matter about my previous
Java experience and so he told me to learn web programming using c#.
I have also many Javascript/DOM experience and I wish to program in my
"already learned mode":
In jsp I program to write Java code in .jsp page directly and I use
HTML and Javascript for client logic: e.g.
<%@ page contentType="text/html; charset=utf-8" language="java"
import="java.sql.*" errorPage="" %>
<%
Connection conn = null;
DatabaseMetaData dbmd;
String info = "";

so is there an equal c# way or what are other ways to accomplish
that ?

Well, I understand that I should to use new methodologies. In fact
today Java programmers use MVC pattern
and tag libs. But however there is also a new trend. Many programmers
use many Javascript API like YUI, Prototype
ecc. and so they don't use the server side tag to render html. They
use server technologies to business logic and client technologies
(Javascript/DOM Ajax Css ecc) to presentation and behavior layer. So I
don't think that they are like old VB6 programmers ... they are only
programmers that are choosing other way to make web programming! Am I
wrong? Am I misunderstanding something? Really I don't think to be
like an idiot but only like a man that is searching a way to don't
loose his background that I assure you it is not so old...
Regards
 
C

Cowboy \(Gregory A. Beamer\)

Mark Rae said:
I couldn't agree more!

AAMOI, have you ever known anyone who made the jump to C# and then made a
conscious decision (i.e. not revenue driven) to go to VB.NET...? I
certainly haven't...


It largely depends on the market. Sometimes you are forced to program in an
inferior language. *duck*

Only kidding about the snarky comment, as I have had to program in VB.NET a
few times. My main reason for sticking with C# is I am lazy and do not want
to type more characters than I have to. ;-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
C

Cowboy \(Gregory A. Beamer\)

For YUI and Prototype, you can get a great deal of the functionality from
the ASP.NET AJAX library, as that is a major focus of both libraries. Much
of the DOM manipulation is emited by controls as you drop them on a form.

Once the MVC Framework is released, you will have even more options to help
separate code from UI.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
josh said:
Exactly!

Actually, it was a lot easier to move from JSP to ASP. But, moving from
JSP to ASP.NET just isn't going to happen.

Aidy,

Great analogy.

Programmers trying to use today's technology like they used last week's
technology is what gets programmers in big trouble. It is the main
reason why I recommend that VB6 programmers learn C# first and then go
back to VB.NET if they must.

To further push the analogy trying to code in ASP.NET like you coded in
JSP is like a 40 year old saying, "I was a teenager once." And trying
to use teen jargon. All he really ends up doing is looking like an
idiot.

Syntactically, there are some similarities. But, you aren't going to
see anything close to MVC/Struts/Model II in ASP.NET (yet... MVC/REST is
coming) so you need to learn multi-tiered architecture first and event
driven programming if you haven't already.

-----Original Message-----
From: Aidy [mailto:[email protected]]

Posted At: Friday, November 23, 2007 5:50 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: jsp to asp
Subject: Re: jsp to asp

You can use some in-line scripting but it isn't recommended.

Basically you can't come to asp.net and hope to use it like you would a
different language. It's like going to France and asking how you can
speak
French but in an English way. Just forget what you know about jsp and
start
from fresh with asp.net.

message.
Hi, I'm a jsp programmer and I have changed work. My boss does not
matter about my previous
Java experience and so he told me to learn web programming using c#.
I have also many Javascript/DOM experience and I wish to program in my
"already learned mode":
In jsp I program to write Java code in .jsp page directly and I use
HTML and Javascript for client logic: e.g.
<%@ page contentType="text/html; charset=utf-8" language="java"
import="java.sql.*" errorPage="" %>
<%
Connection conn = null;
DatabaseMetaData dbmd;
String info = "";

so is there an equal c# way or what are other ways to accomplish
that ?

Well, I understand that I should to use new methodologies. In fact
today Java programmers use MVC pattern
and tag libs. But however there is also a new trend. Many programmers
use many Javascript API like YUI, Prototype
ecc. and so they don't use the server side tag to render html. They
use server technologies to business logic and client technologies
(Javascript/DOM Ajax Css ecc) to presentation and behavior layer. So I
don't think that they are like old VB6 programmers ... they are only
programmers that are choosing other way to make web programming! Am I
wrong? Am I misunderstanding something? Really I don't think to be
like an idiot but only like a man that is searching a way to don't
loose his background that I assure you it is not so old...
Regards
 
C

Cowboy \(Gregory A. Beamer\)

Coding in VB.NET versus being poked in the eye with a sharp stick? Probably
would prefer coding in VB.NET. :)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top