I'm finishing a survey of web development technologies class. We've covered everything from PHP to Perl + CGI, classic ASP and ASP.NET, and JSP. I spent this past summer learning RoR, and I plan on picking up Django next summer.
[non-flame-bait personal opinion]
And, I have to say that I came to a strong dislike for ASP.net. In fact I was carrying a 4.0 until this ASP.NET project. I disliked it so much, I didn't finish the project. Perhaps if I spent more time on it, It might fit a little better, but from what I"ve seen, I hate it mightily.
The benefits:
It works well with IIS and the Microsoft Server stack. If that's what you know, stick with it. You'll spend months learning unix shell commands, and file structure, and how to install things, etc... I'm more of a unix guy and prefer to develop with unix on the server side. If that's not your cup of tea, then stay on the Microsoft side of life.
The cons:
I also didn't like the idea of ASP.NET pages. I found it really combuersone to code all the labels in the body of the <script> tags, and then output them at the bottom in the html. I simply found it really hard to get my mind around the ASP.NET way. I really didn't want to understand the ASP.NET way, I guess. I don't like how it handles SQL queries. I found it burdensome and cumbersome to write 5-6 lines of code on every page that access the database, to set the SQL query to a variable, execute the query. put the SQL query into a reader, then transfer the reader to another variable that's usable. Too long, clanky, too long. And, doing that for every page you're working on: BOORRRIIIINnnnggg! :)
Disclaimer
I was just starting out with ASP.NET, and I'm sure there's tips and tricks that would speed development up, and I'm sure I went about things all wrong. It's just that Rails really spoiled me this past summer. with the MVC model. Set up database connections once, access what you need through active record. Variables are there for you in the controller. Spit them out and format them in your views. It's like Ron Popeil says about his rotisserie: You set it and forget it!
The problem isn't ASP.NET: it's probably the way you were taught how to use it. The Microsoft tools do so much crap that it's like being put into a room full of levers and knobs with cryptic labels on them. Hard to know where to start or how to make things work.
Sit down with somebody who is using one of the automated DALs (like NetTiers, NHibernate, CSLA, etc) and knows what the heck they are doing. You'll find it very intuitive and the speed of development can keep pace (or surpass, depending on the domain) any other kind of web development.
Now for the BUT part. BUT you have to be doing straight-forward business development. Stuff in the middle of the road. Writing a check. Checking your email. Posting a message.Viewing your box scores. Etc. If you want something like an animated dancing baby that does different dances depending on your current stock portfolio and can sing out your RSS feeds in different languages, you're back to basics, and all that abstraction is going to get in your way big time. Also, if you want to scale up to 100K users quickly you're going to be learning a lot more about tweaking IIS and ASP.NET than you probably wanted. But for a lot of stuff, it's just fine. Not everybody is writing the next YouTube, and you can't beat the libraries available to you over on the "dark" side.(grin)
"If you want something like an animated dancing baby that does different dances depending on your current stock portfolio and can sing out your RSS feeds in different languages..."
"Sit down with somebody who is using one of the automated DALs (like NetTiers, NHibernate, CSLA, etc) and knows what the heck they are doing. You'll find it very intuitive and the speed of development can keep pace (or surpass, depending on the domain) any other kind of web development."
Oh come on, this applies for ANY tool in ANY domain. This is non-information.
Most ASP.NET training sucks. Does that say it any better? It's not a matter of the lanugage or the platform, it's that the instruction and tools are lame. Certainly that isn't true for any platform, is it?
Me neither. I must have booted up Big Endian again. I hate it when I do that.
Take two programmers who are novices. Throw them into any two languages. If we use an automated DAL and a mentor-apprentice training paradigm in both languages, I can have the ASP.NET guy up and running and more productive faster than the other guy. <disclaim>for writing average run-of-the-mill web apps</disclaim>
I'm not sure that getting ASP.NET guy up and running and more productive faster is a laudable goal. Say productivity of ASP.NET guy is f(t) where t is time and productivity of <something-else> guy is g(t). I would submit that there exists some T where g(t) > f(t) for all t > T (t starts at 0, for simplicity.)
That is my stupid way of saying, who gives a crap how long stupid ASP.NET guy takes to get productive? In the long run, inevitably, someone else will be better.
"That is my stupid way of saying, who gives a crap how long stupid ASP.NET guy takes to get productive? In the long run, inevitably, someone else will be better."
I liked it better with the forumlas. (grin) Seriously -- that's a good point. But I don't think it is language-dependent. Might be. I don't know. From what I've seen languages and platforms are just new and interesting ways for programmers to shoot themselves in the foot. Good programming remains the same now as it was decades ago. That is, unless somebody has started using the force and I don't know about it.
You mean that subset of straightforward business development that Microsoft thinks ASP.NET is for. If you want to put subtotals in a grid of financial numbers, for example, you either have to jump through hoops or move it off to Microsoft Reporting Services or Crystal Reports.
There's a wide gap between where ASP.NET's usefulness ends and where the really fancy stuff begins.
And yes, you totally can beat the libraries available on the "Dark Side." You'd have to try hard not to.
"There's a wide gap between where ASP.NET's usefulness ends and where the really fancy stuff begins." -- yes. This is the frustration of ASP.NET programming _without_ the underlying HTML/JS/CSS/XML knowledge. It's like you can almost do everything you want, but not quite. The grid control, as you mention, does some totally sweet stuff right out of the box. But want subtotals? Time to learn about the IIS HTTP Pipeline.
It all boils down to what you are doing. Lots of shops can have 3 or 4 coders doing the mainline stuff and 1 guy who can do the tricky stuff. It's an effective use of lower-skilled programming resources.
I'd have to disagree with you on the libraries. While I'm sure there are some good libraries out there, when I'm plugged into VS I've got some kazillion or so things I can do without having to Google, link, recompile, or do squat. And I can easily make libraries to share with others. It depends on your needs. Since MS does a little bit of everything for everybody, the libraries are probably the broadest that are easily available.
Java libraries, CPAN, and the Unix/C universe of libraries are three examples. But you should only check them out if there's a library that does the specific thing you want.
Yeah, I really have to second this one. It's not just the UNIX/C universe, though -- it's the UNIX scripting universe. As a particular example, how do you tie your graphing software to your analysis software to your screen scraping software? You could try writing them all in Python -- or you could just use pipes and tie together GNU plot and wget with some custom filters in Python. It takes a few years to get confident with this stuff; but once you are, you will never write so little code :)
You should either use NHibernate, SubSonic or wait for EDM/LinQ in the upcoming ASP.NET so you won't deal with 5-6 lines of ADO.NET code.
But I have to agree with you, it's not that straightforward to understand ASP.NET esp if you have previous knowledge of developing web-app because ASP.NET tries to abstract everything out for you (via their Controls, ViewState etc).
On the other side, ASP.NET might not be discipline in terms of MVC but then again it is ridiculously easy to re-create a GridView such that I don't care much about the VC part of the MVC. I write less code thanks to Visual Web Developer tool.
Wow, thanks, Guys. If I were still working on that project I'd probably pick your brains a bit more.
And, I think that you hit the nail on the head about abstracting everything out for me. In the short ammount of time, I just couldn't grokk it, but I knew I didn't like it.
It seemed like ASP.NET was a purposefull movement away from typical web development. And, I'm sure that Microsoft was trying to fix problems that they say with typical web dev.
I just think that there are better solutions out there than ASP.NET. But, if you're a windows guy and used to coding in Visual Studio, and you can already use the languages that you are used to, it might be a really good idea.
I found that ASP.NET was a good stop off point between writing desktop apps and writing web apps.
All the event handling logic and the postback thing meant I could bring most of my desktop thinking across and be productive immediately. The problem I had was once I had been working on the web a while I realised the abstractions were broken but the framework didn't leave me anywhere to go.
<cringe>We also use Code Generation software that builds all the CRUD methods automatically.</cringe>
I can understand what would bring you to using a code generator, but the examples I have seen in practice are not good. I think code generators show there is something fundamentally wrong with the language/framework.
It shows a lack of nothing. What DAL is a code generator that writes large quantities of code based on your 'models'? It simply provides a better or easier interface.
Here is what I meant:
When a commercial application becomes popular to generate large amounts of code to do a small amount of work, like some CRUD, I personally feel that shows a flaw in the fundamental way the language works. The language should either be able to offer you a better way of doing it yourself, or writing a small framework for yourself. If neither of these are viable options, I would consider that a serious knock against the language.
I'm hoping I'm not getting into a flame war -- not my intent.
Here's the problem with what you said -- the word "code". It's not defined. In any kind of large environment, my application uses all kinds of compiled code. So what if I push a button or flick a switch to use another hunk of code that I don't have to write or test? Is using System.Io somehow "better" than say, having an automated macro that generates IO based on some user preference?
Yes -- I would agree that if I have to write and maintain a large amount of code to do easy stuff we've got a problem somewhere. But if my platform is powerful enough to allow me to use multiple Data Access paradigms without any work on my part? Who cares if when I flip the switch the code is generated and compiled or if it was generated and compiled last week or last year?
Take a look at something like CodeSmith. Here's a tool that uses .NET to write programs for .NET. Now yes, you can generate a lot of code that way -- if you want to look at it like that. You can also go and get open source libraries and templates that will generate tested, proven, full-featured libraries based on your particular situation. Isn't that a much better thing than simply having one paradigm that everybody has to shoe-horn their work into?
No cause for concern - I understand that a lot of what we are disagreeing on here are small points. This is the proper venue for discussion, and I appreciate your points.
I do agree that having some sort of code generation does have a place, and can be useful. But it is also has it's problems, especially related to maintainability. Lastly, the last time I looked at some code generation, there was so much custom junk built on top of the generated code, it was like they were using a round peg for a square hole.
Obviously, I am biased by what I have seen in practice. I also dislike a lot of 'magic', or things I don't understand and have control over being tightly integrated with my code.
I've had a lot of bad experiece with Code Generation as well.
What I think I see happening over the past few years is a lot of authors and researchers developing code generation templates as part of their work. So instead of the guy who's got the book telling you to make 7-tier, multi-phasic, distributed apps, you got the guy, a website, a following, and a set of templates and wizards that make this thing for you.
I'm not crazy about that at all, but I think it is having the effect of evolving the code generation community. I'm seeing a lot more people who want to "program the programming" Most, of course, create monsters. But it only takes one good set of easily-used and rock-solid templates to create real value for everybody. So in the old days, there was 5-10 CASE tools and they all sucked, now there's more like 500 template authors, and 10-15 are pretty good. In my opinion, that's a good trend, but the genre of "code generation" still has a well-deserved negative connotation.
Please. Keep down-modding me on this thread. Show me how you really feel! (laughing) By voting me down you can show your disagreement without actually having to participate in the discussion.
if you use datasets you can do all that boring sql stuff in 1 line of code. Also you can create a DAL and map those objects to the server controls without writing a line of code if you use VS2005 and above.
[non-flame-bait personal opinion]
And, I have to say that I came to a strong dislike for ASP.net. In fact I was carrying a 4.0 until this ASP.NET project. I disliked it so much, I didn't finish the project. Perhaps if I spent more time on it, It might fit a little better, but from what I"ve seen, I hate it mightily.
The benefits:
It works well with IIS and the Microsoft Server stack. If that's what you know, stick with it. You'll spend months learning unix shell commands, and file structure, and how to install things, etc... I'm more of a unix guy and prefer to develop with unix on the server side. If that's not your cup of tea, then stay on the Microsoft side of life.
The cons:
I also didn't like the idea of ASP.NET pages. I found it really combuersone to code all the labels in the body of the <script> tags, and then output them at the bottom in the html. I simply found it really hard to get my mind around the ASP.NET way. I really didn't want to understand the ASP.NET way, I guess. I don't like how it handles SQL queries. I found it burdensome and cumbersome to write 5-6 lines of code on every page that access the database, to set the SQL query to a variable, execute the query. put the SQL query into a reader, then transfer the reader to another variable that's usable. Too long, clanky, too long. And, doing that for every page you're working on: BOORRRIIIINnnnggg! :)
Disclaimer
I was just starting out with ASP.NET, and I'm sure there's tips and tricks that would speed development up, and I'm sure I went about things all wrong. It's just that Rails really spoiled me this past summer. with the MVC model. Set up database connections once, access what you need through active record. Variables are there for you in the controller. Spit them out and format them in your views. It's like Ron Popeil says about his rotisserie: You set it and forget it!
[/non-flame-bait personal opinion]