CodeBehind vs traditional html with javascript

G

Guest

Hi,

I'm new to ASP.NET and I am not sure if I should start using the code behind
paradigm or if I should just go with traditional HTML, CSS, and JavaScript.
Although Code Behind seems nice, the .NET Studio IDE is not very good at
building templates and such as is Dreamweaver. Furthermore, it's always a
good idea to really understand what is happening behing the scenes in case
the code ever needs to move to jsp, php or some other page rending technology.

I'd like to know what you guys feel about code behind.

Thanks a lot.
 
P

Peter Rilling

Really depends on what you need. I like server-side code because it allows
for the complete OOP paradigm that high level languages provides. I like
the ability to create classes and inheritance and polymorphism. Also, the
code on the server is hidden. The user cannot see how you do something.
The consequence is that everytime that you want to do something, the page
may need to round trip to the server.

JavaScript allows for immediate interaction. No round trips are needed.
However, the user can download the JavaScript code and see how things work.
Although there are some OOP construct, it is not as rich as server code.
Also people could turn JavaScript off which would break everything. With
server code, only some things are broken when there is no JavaScript.
 
G

Guest

Thanks for your reply peter.

..aspx pages render html just like using Response.Write. All the code is not
hidden from the client. Besides, who cares if someone looks at some
javascript code. All the secure stuff should be in some business objects.

From what I see, the problem with code behind really binds you to microsoft.
It is not a standard and code is not easily ported to some other page
rendering technology.
 
K

Kevin Spencer

HTML, CSS, and JavaScript are all client-side, and do not allow for any
server-side processing. As for the "Code-Behind paradigm," I have no idea
what that means in this context. Like any other server-side application,
there is server-side code involved. How you arrange it is your business.
Well, also the business of anyone that has to work on your code after you,
including yourself 6 months down the road.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 

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