| This 62 message thread spans 3 pages: 62 (  2 3 ) > > || |
|What is the benefit of .NET?|
In simple terms
| 1:59 am on May 13, 2005 (gmt 0)|
I've been coding sites with ASP for years, very successfully. I've done some amazing things and created some great apps.
Now I am finally starting to use the .NET for a new project, enjoying it, but still fail to get the "AHA" moment as to why it's so much more superior to regular ASP.
Most everything I've done has required much more coding than the same functions in ASP. Although, it has been nice being able to create one CONNECTION class, and one function for running queries, updates and deletes, by passing the SQL statement.
It seems like a lot more work for not much more output. But I DO want to be proven wrong, and would like to be able to explain in simple non-Geek terms why it's worth learning.
| 3:57 am on May 13, 2005 (gmt 0)|
the .Net framework is 1 good reason. just import the namespaces and you have access to so much built in code....
visual studio intellisense, object oriented programming, compiled code, etc....
what has taken you much more lines of code if I may ask?
| 4:43 am on May 13, 2005 (gmt 0)|
visual studio intellisense, object oriented programming, compiled code, etc....
That's all great geek stuff, but to Mrs. txbakers it's all greek. For the end user, what are the advantages?
To populate a drop down box from the DB and to pre-populate an update form has been an enormous task. The edit feature of the datagrid is nice, but many times I just want to edit a lot of fields in 1 form, without showing the rest of the fields.
But I am learning.....
| 7:30 am on May 13, 2005 (gmt 0)|
There are many ways to skin a cat in programming....what you say is hard I say I can do in a few lines of code...with databinding or accessing the properties of the objects like textbox1.text = "database value".
to an end user...they shouldn't be able to tell what is ASP.Net, PHP, ASP, Java, etc. You are still only rendering HTML. The biggest benefit in my opinion is to the developers in terms of what tools are built into the architechture.
Once you get the hang of it I guarantee that you will not want to use classic ASP scripting. Eveyone in our shop would say the same thing....we even have old cobol programmers start off web development with .Net.
| 9:49 am on May 13, 2005 (gmt 0)|
The main advantages of .NET
3. it's faster
4. it's much faster
Simply by translating your existing interpreted ASP/VBScript code to compiled ASP.Net/VB.Net code will give you a massive performance boost on existing sites.
The other advantage is that it's quicker to develop. You must be doing it wrong ;-) No, seriously. It does take a while to pick up, but development times will be shorter once you get it right.
It's much easier to write modular code and extensible code with the .Net languages and even VB.Net has a good object oriented structure, so code reuse is muh easier. You're almost forced to write modular code with ASP.Net.
| 12:03 pm on May 13, 2005 (gmt 0)|
So I guess you could say it's.....faster ... on both ends? 8)
(after the learning curve that is.....)
I do see the reusability being a help.. Already I've created about 5 pages and only had to use my connection and query processor once.
| 12:57 pm on May 13, 2005 (gmt 0)|
- Increased Performance
- Increased Stability
- Increased Developer Productivity
| 2:05 pm on May 13, 2005 (gmt 0)|
Thanks txt, have been wondering this myself a lot lately.
As a web developer if you are comparing VB.NET to vbScript then the main benefit seems to performance, but I guess its only noticeable for sites with very intensive server side scripting . If your scripts are taking so long to execute and the servers capacity for RAM has been reached then re-writing it in .NET may help you out here.
ASP.NET compared to ASP, I cant see any benefits really in performance , but most my code is compiled anyway using VB6/COM,ASP is just the glue.
One benefit ASP.NET does has over ASP/COM is the ability to register components without being on the server itself, but remote access gives you this anyway.
I think code re-use is a design issue , if you design your classes well then vbscript can do this just as well as .NET.
The main .NET benefits and IMO the reason it was invented are not really relevant to most web developers I know. The ability to write in multiple languages, support for mobile devices etc.
>visual studio intellisense, object oriented programming, compiled code, etc....
All available with classic ASP
| 2:14 pm on May 13, 2005 (gmt 0)|
.NET's approach to web pages results in bloated HTML and pretty much forces you to host on Windows servers. There are so many useful bits done in PHP that it is not wise to stick to .NET on the web.
I've been programming in .NET for the last few years, and find that its great for server side apps that need performance. This is where one notable exception comes from - web service, I'd say .NET is better for those than PHP.
| 2:21 pm on May 13, 2005 (gmt 0)|
>This is where one notable exception comes from - web service
I will add that writing code to query and display data from an web service/xml source (whatever they are called now!) is very,very easy in .NET - when .NET first came out I implemented a working amazon feed site in a few lines of code.
| 3:17 pm on May 13, 2005 (gmt 0)|
According to MS ASP.NET applications can handle two to three times the requests per second as classic ASP applications.
| 3:43 pm on May 13, 2005 (gmt 0)|
|ASP.NET compared to ASP, I cant see any benefits really in performance , but most my code is compiled anyway using VB6/COM,ASP is just the glue. |
Well, you were one of the few that was using ASP properly. However, when most people thing of ASP, they think of VBScript, and when they refer to ASP.Net being faster than ASP they're generally referring to VB.Net being faster than VBScript.
It all comes down to compiled vs. interpreted code. There's nothing you can do in ASP.Net that you couldn't do in ASP.
The thing is that it's easier for dumbass programmers to get it right in ASP.Net. ASP made it easy to write shoddy code, it's harder to do that in ASP.Net
| 4:40 pm on May 13, 2005 (gmt 0)|
|The thing is that it's easier for dumbass programmers to get it right in ASP.Net. ASP made it easy to write shoddy code, it's harder to do that in ASP.Net |
Truer words were never written.
ASP did make it easy... too easy. In fact if you peruse the Don Box videos on channel 9 he even states that ms is purposely making things harder becaue there are a lot of mouths to feed in our industry.
| 5:34 pm on May 13, 2005 (gmt 0)|
|ASP made it easy to write shoddy code, it's harder to do that in ASP.Net |
That's very true too. It really is a new mind set, and I'm slowly coming to terms with it.
In fact, it's impossible to write bad code, because it won't compile. People can still write spaghetti, and can make too many redundancies, but working through the Murach book has been really helpful in that regard.
ALSO: I found a nice mySQL Component for .NET from CoreLabs. So you don't have to use OLEDB functions. Very fast. I still haven't found the right syntax for parameters yet.
I ran into something interesting with the validation controls, which I'll post in a separate thread.
| 6:28 pm on May 13, 2005 (gmt 0)|
txbakers, if mysql parameters are anything like mssql parameters then your call could look something like this stored procedure call. Pass in 1 parameter and collect 1 output parameter.
// assumes you've set mConnectionString...
SqlConnection mCnn = new SqlConnection(mConnectionString);
SqlCommand mCmd = new SqlCommand("sproc_name", mCnn);
mCmd.CommandType = CommandType.StoredProcedure;
SqlParameter _pInputSample = new SqlParameter("@i_iInputSample", SqlDbType.Int);
_pInputSample.Direction = ParameterDirection.Input;
_pInputSample.Value = someValue;
SqlParameter _pOutputSample = new SqlParameter("@o_vOutputSample", SqlDbType.VarChar, 255);
_pOutputSample.Direction = ParameterDirection.Output;
string retVal = (string) _pOutputSample.Value;
| 7:01 pm on May 13, 2005 (gmt 0)|
that's the issue, I don't think they are link MSSQL parameters. I'll give it a try with the @ and see what shakes.
| 3:55 am on May 15, 2005 (gmt 0)|
ASP is a scripting language, a toy. C#, VB.net et al. are real programming languages that can be used to render web pages using ASP.Net if needed. The number 1 advantage to it is obviously being able to do OOP. Gone are the days of presentation, business and data access logic being contained in a single asp page. Think of having a dll with all your business logic that can be referenced by any number of web sites OR any number of windows apps used internally, when changes need to be made you update a single assembly and then re-deploy. Obviously this could be done with asp and com but then you are working in 2 different languages and plenty of other problems go along with that solution.
I too did not truly understand the benefits of .net until I started working at a company that uses .net and remoting to create a very nice n-tiered architecture that runs many heavy traffic sites and also supports a handful of backend services.
If you aren't doing any serious enterprise applications then you may not immediately see any benefits to asp.net. There is also a bit of a learning curve because it is a completely different programing paradigm, hard to grasp at first how to do even the simplest task that would take 30 seconds to create in asp.
I recommend the book "Expert C# Business Objects" if you are interested in really harnessing the power and advantages of .net.
| 1:06 pm on May 15, 2005 (gmt 0)|
|ASP is a scripting language |
ASP is a web platform. VBScript is a scripting language.
|The number 1 advantage to it is obviously being able to do OOP. |
ASP has an object oriented model.
|Gone are the days of presentation, business and data access logic being contained in a single asp page. |
Nope, you can still whack it all in one page if you want to. And the same goes in ASP classic. In ASP classic, you could seperate everything out, it's just that most people didn't.
|Think of having a dll with all your business logic that can be referenced by any number of web sites OR any number of windows apps used internally |
|Obviously this could be done with asp and com but then you are working in 2 different languages and plenty of other problems go along with that solution. |
It would help if you mention the other problems, because I can't think what they are.
I don't really see the problem with using two languages. I find that being able to use multiple languages is the best selling point of both ASP and ASP.Net.
|too did not truly understand the benefits of .net until I started working at a company that uses .net |
You met some people that used ASP.Net properly. Now if you'd met some people that used ASP properly, you wouldn't be quite so negative about it.
I'm not trying to dismiss ASP.Net. I use .Net myself. On most web sites, the fact that you're compiling all your code is enough to warrant using .Net.
However I think you have to be careful about repeating the hype that Micropsoft put out. When people read this unbelievable hype, they suspect that everything said about .Net is also Hype. That's a shame because there are some real benefits.
| 4:47 pm on May 15, 2005 (gmt 0)|
|ASP is a web platform. VBScript is a scripting language. |
Ok, ASP is a script interpreter, VBScript is still a toy.
|ASP has an object oriented model. |
OOP implies classes and polymorphism, can't be done with VBScript. How do you use C++ w/ ASP unless it's an external COM?.. In which case it isn't part of ASP at all.
|Nope, you can still whack it all in one page if you want to. And the same goes in ASP classic. In ASP classic, you could seperate everything out, it's just that most people didn't. |
Exactly my point, most people don't because you you have to have another area of expertise altogether to create com objects.
|It would help if you mention the other problems, because I can't think what they are. |
updating component services with new versions.
exporting proxy classes to install on the web servers.
all too much of a manual process
ohhh puuuuuhhlease, hardly the same language. Similar syntax sure, but you need a completely different skill set to make good com objects.
|You met some people that used ASP.Net properly. Now if you'd met some people that used ASP properly, you wouldn't be quite so negative about it. |
Actually we use both porperly, the asp sites support over 2 milliion subscribers very stably.
I used asp to make a living for many years, the dude asked about benefits of .net vs. asp and I posted by personal experiences. No microsoft hype here, just my opinion.
| 5:43 pm on May 15, 2005 (gmt 0)|
personally I almost always use PHP for Internet and ASP/.NET for Intranet work.
| 6:05 pm on May 15, 2005 (gmt 0)|
I'm using it and very happilly i might add!
Dual Opteron, serving 500 page requests a second with on the fly Zip compression. CPU doesn't go over 30%
| 7:35 pm on May 15, 2005 (gmt 0)|
"Benefits of going .NET" ... NONE!
"Benefits of MS" ... NONE!
Ok... had to throw in my little flamage :)
| 10:30 pm on May 15, 2005 (gmt 0)|
>ASP.NET compared to ASP, I cant see any benefits really in performance , but most my code is compiled anyway using VB6/COM,ASP is just the glue.
VB6/COM uses a single appartment thread. Context switching for any session or maintained objects kills a server with a lot of traffic. ASP.NET doesn't have this problem.
One application I wrote first in VB6/COM killed a server (100% CPU) under stress testing with 20-30 simultaneous requests. The same application re-written in C#, now far more complex, can handle several hundred simultaneous requests without a problem.
This is why I initially switched to .NET. I used ASP daily for 3 years. Switched to .NET in 2002 and never looked back! I hate having to maintain my old ASP based sites.
Other features off the top of my head I use daily are:
Web Custom Controls
These can probably be rigged in ASP, but they are automatic in .NET. Nothing like [WebMethod] and Add Web Reference to make integration easy.
And 2.0 will bring Master Pages and a Portal Framework...
| 3:26 am on May 16, 2005 (gmt 0)|
I don't know if you could use VbScript classes in ASP 1.0, but I'm pretty sure it was there in 2.0. Anyway, I was very glad when I found that the capability was there. I always tried to use compiled DLLs, but sometimes it wasn't possible (deploying to a hosted shared server for instance). So it was nice to be able to get solid N-Tier architecture without compiling.
The issues I have with .Net are some of the features that others are claiming as benefits. Use of server-side controls really hides a lot from the developer. The delivered HTML can become bloated; and you can have rather large projects where NOBODY really understands how all of the finer details of the browser-server interaction really work.
Data binding is a new invitation to do really sh***y work. It makes it too easy to code business rules in the presentation layer. Or the stored procedures. Or both. And not in the business layer.
Don't get me wrong - I like .Net better than the old ASP/VbScript/VB combo. One thing that is much better than ASP/VbScript/VB DLLs is the implementation of true inheritance.
| 4:09 am on May 16, 2005 (gmt 0)|
One thing I'm having difficulty getting my head around, coming from straight ASP, are the concepts of DataSets and DataAdapters. Even here I'm having difficulty describing it.
To update a table before was 5 or 6 lines of code, now it requires three different methods and even more for proper validation.
I was going round and round trying to find why a row wasn't being updated until I realized that in the upDate function, which was sent the DataSet (which was populated earlier and stored in a Session, which I forgot to do, trying to sort out which was posting back and which weren't...) I didn't bring in enough fields in the select!
Why do I need to write a select statement in order to execute an update or delete? That baffles me at this point. Perhaps it will come clearer.
I do agree that the resulting HTML is a mess. I don't like seeing my buttons called "dgMins_ctl1_ctl3", and there are so many other things I took great pains to code by hand using ASP which come out shoddy in the ASPX version.
Early on I ditched any type of GUI editor so I could make the markup neat, now with the VS.NET it's back to looking like a GUI.
| 7:53 am on May 16, 2005 (gmt 0)|
|VB6/COM uses a single appartment thread. Context switching for any session or maintained objects kills a server with a lot of traffic. ASP.NET doesn't have this problem. |
What do you mean by maintained objects? Components should be stateless, its a fundamental.
There are ways to design and use componenets that perform very well - thread pools, marshalling, ms transaction server.
|One application I wrote first in VB6/COM killed a server...with 20-30 simultaneous requests. The same application re-written in C#....can handle several hundred ... |
I dont doubt what you are saying, but maybe the same component written in C++ , with an appropriate threading model & loaded in MTS would also have performed better.
Dont get me wrong, I'm not saying ASP with VB6/COM performs as good as ASP.NET with VB.NET.
Im saying for most web developers I know and most my applications, performance is not a real bottleneck. If it is/was, then RAM/Bandwidth/HD RPM/RAID Array is the easy way to solve it.
All this speak of the need for increased perofrmance in the code is just Microsoft rhetoric, they know that bigger/faster sells, whether its needed or not.
| 9:30 am on May 16, 2005 (gmt 0)|
It's not really a comparison between asp.net and classic asp for me, it's vbscript+asp+vb6+interdev+bunch of components versus vb.net+vs.net :O) I am more productive on larger projects with new way of working than with old way of working. I still find myself throwing tiny asp/php tactical sites together though.
The amount of coden you need to write has dropped in the new version currently in beta. The .NET framework has much lovliness in it, dive in and consume :O)
Visual Studio + .NET Framework is a good combo for productive programming. OO is truly baked in and it as a true even-driven model. C# is up there with Java, easy for beginners but really powerful and clean, personally I use VB.NET which is plenty for my purposes. XML and HTTP classes are pretty cool. Lots of nice housekeeping stuff taken care of (still a good idea to tidy up after yourself though). ASP.NET user interface stuff like datagrids and validation saves time on certain tasks, even better in new version. User controls, master pages, url rewriting, GDI+ .. all possible in classic but more accessible in .NET without using components. XCopy deployment, passwording through web.config, nice for admin.
In the end the value of a platform is mostly what you put into it and what you are comfortable working with. Since I first started working with asp.net I have built up a good library of code but I know PHP guys who are just as productive and do some pretty cool things and I dont know of anything I have done in asp.net that couldnt have been done in Perl back when I did that. YMMV I guess.
| 9:58 am on May 16, 2005 (gmt 0)|
I hate to state the obvious, but companies like Amazon, Google, Yahoo, Ticketmaster, etc..etc.. dont use .net for one simple reason. Total cost of ownership.
IMHO microsoft will squeeze every dollar out of your dev project and will do it with a smile. I'm sure you'll agree that when you're running a small business, every dollar counts, especially when you start getting traffic and have to start load sharing with multiple servers. If you're going to get nailed for a license fee every time you add a server to the cluster, you're going to have a big incentive to stay small.
I own a profitable web based business and everything from OS to App server to programming language to database is open source and we don't pay a cent for licensing. Commercial support is also available for every open source product we use at reasonable rates. Commercial support is even more expensive for MS products because you end up paying for your support person's school fees which of course go straight back to MS once again. An MCSD.NET 14 day package costs around $8k right now. Comparing apples with apples, an MCSE costs over $8k while an RHCE costs $2.5k.
I started my career as an mcse+mcsd many many years ago and bled many a fortune 500 for consulting fees until I started playing with Apache on Linux and had that AHA moment you're looking for.
oops, I just realized this is the .net forum. Oh well - come over from the dark side luke!
| 10:17 am on May 16, 2005 (gmt 0)|
>> For the end user, what are the advantages?
If the end user is the guy/girl that has to load all the...... whatsitscalled... "state" something on a modem, then there are only disadvantages. Dot net produces the most bloated html code seen. Also, i've experineced it turn whole pages into forms so that you couldn't submit in a search box using the enter button.
And, it might be fast to you guys, but then i'd have to say i've never visited your sites.
Fast to develop in? Gimmie a break - that's not a benefit. Benefits come on the user side, not the developer side.
For the programmer - well, i see this from an entirely other side, ie. MS Office programming. I would never use dot net on the web, but some of my customers do so, and seeing their sites has helped me get that view.
In MS Office programming there's some new stuff to learn when you interact with web services, and it's all dot net something in stead of the common names like xml and so on. It's not really a benefit, it's just a different way of doing stuff - like, every few years MS changes lots of stuff so that the new things you write can't be used in your old apps.
Then again, never mind if my work is easier or harder. The customer pays and if i spend more time producing a mousetrap it will cost more than a faster developed one. Still, quality will have to be the same or better, it will never decrease. So, sofar this only means higher prices, no real benefits.
Oh, i should add - IMHO from a dev POV you can do pretty advanced stuff, but sometimes it's all backwards. They never get the basics right at MS, there are always these little odd twists...
| 10:48 am on May 16, 2005 (gmt 0)|
>IMHO microsoft will squeeze every dollar out of your dev project and will do it with a smile
So true, they even charge me £25.55 to downgrade my Visual Studio.NET back to Version 6 :(
| This 62 message thread spans 3 pages: 62 (  2 3 ) > > |