Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

What's the point of .NET

Options
  • 20-01-2012 3:38pm
    #1
    Registered Users Posts: 1,657 ✭✭✭


    I was just thinking this last night... Why do people write websites using .NET? It costs money, the coding is more complicated if you're not using MS's IDE (than PHP/HTML)... You can only have one form per page...

    Yet it seems to be more popular... ??


Comments

  • Registered Users Posts: 11,979 ✭✭✭✭Giblet


    You mean ASP Webforms, not .NET

    Doesn't cost anything. I agree that one form is annoying. As for coding being more complicated? It's way more powerful than PHP, and I find the syntax much easier.

    You can download ASP MVC 3 for free right now and give it a bash. Allows more control over the outputted HTML and allows more than one form!

    Why wouldn't you use Visual Studio? It's one of the best IDEs out there!


  • Registered Users Posts: 2,494 ✭✭✭kayos


    komodosp wrote: »
    I was just thinking this last night... Why do people write websites using .NET? It costs money, the coding is more complicated if you're not using MS's IDE (than PHP/HTML)... You can only have one form per page...

    Yet it seems to be more popular... ??

    .NET does not cost money. If you want to write c# open notepad and go for it and then use the command line to build your code. Finding the coding complicated is a subjective view. Any way you can always just get the express versions of the IDE's they are free after all.


  • Registered Users Posts: 14,336 ✭✭✭✭jimmycrackcorm


    .Net is integrated. Having developed in both Java and .Net I have to say that .Net is simply more elegant. Don't forget that .Net and C# took lessons from Java and utilised the best parts.


  • Moderators, Business & Finance Moderators Posts: 10,258 Mod ✭✭✭✭Jim2007


    .Net is integrated. Having developed in both Java and .Net I have to say that .Net is simply more elegant. Don't forget that .Net and C# took lessons from Java and utilised the best parts.

    Anders Hejlsberg had worked on several languages before he got involved in the .Net efforts, so he learned from his mistakes... Some where on the net is a radio interview with him and a few other x Borland guys where they discuss the changes they would make if they had the chance to start over....

    As a former Delphi programmer, I found C# had a lot in common with Delphi as well.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    ASP.Net gives you lots of cool features that can hugely boost productivity. It give you tons of useful controls, simple data access mechanisms and data binding, a page lifecycle with event handling, form state persistence, user authentication mechanisms, easy configuration tools, an easy to use ajax framework and lots more, and that's even before you start to think of all the goodness that MVC brings.

    One thing I find is that newcomers to ASP.Net, especially people who have used things like PHP where you just start with an empty code file and start mixing in any HTML and code you like, get frustrated with some of the things in ASP.Net, like server controls, because they often give you 90% of what you need but refuse to do the last 10%.

    But, the more you get to know ASP.Net, the more mechanisms you learn for getting that last 10%, and they are there, it's just a case of knowing what ones to use and when. Like pretty much any development platform, the better you get to know the tools you are using, the more capable you are of using them in better ways, and of adjusting your own process to maximise their effectiveness. One example being the multiple forms thing, in the vast majority of cases you don't really need multiple forms, you're just using ASP.Net wrong.

    I suspect that in many/most cases PHP devs work with a number of different frameworks, both 3rd party and in-house. While these frameworks will provide lots of useful features and speed development along, their use of elements from the framework is limited by the limitations of the frameworks themselves. In much the same way, most of ASP.Net is really just a 3rd party framework, it provides lots of useful features to help your development, but in taking on those features you are also taking on their limitations.

    And if it all comes down to it, you can just open a blank code file and start mixing HTML with code however you feel like it with ASP.Net in more or less the same way you would with PHP. You're just missing out on all the good stuff by doing so.


  • Advertisement
  • Moderators, Business & Finance Moderators Posts: 10,258 Mod ✭✭✭✭Jim2007


    stevenmu wrote: »
    And if it all comes down to it, you can just open a blank code file and start mixing HTML with code however you feel like it with ASP.Net in more or less the same way you would with PHP. You're just missing out on all the good stuff by doing so.

    This is a common enough mistake made by people switching technologies and not just with ASP.NET versus PHP! Every environment has it's own concepts and ways of doing things and you are post productive when you harness the new technology and work with it rather than work against it.


  • Moderators, Business & Finance Moderators Posts: 10,258 Mod ✭✭✭✭Jim2007


    komodosp wrote: »
    I was just thinking this last night... Why do people write websites using .NET? It costs money, the coding is more complicated if you're not using MS's IDE (than PHP/HTML)... You can only have one form per page...

    Yet it seems to be more popular... ??

    Well first of all it does not cost money as you suggest, you'd be hard pressed to find an IDE as good as the express editions of visual studio in the OS community.

    On the other hand no matter what tools you choose, it costs money to develop and operate any large website. And when you look at the total cost of ownership, the cost of the licenses for various MS technologies as compared to the OS alternatives is not going to be a deal breaker.

    The other thing to consider is that most corporate developers are responsible for developing all kinds of enterprise applications and not just websites, so their tool set is going to be more suited to supporting them in all application development situations rather than just websites, meaning either Java or .Net.

    And of course if you've spent the day working for "the man", chances are you'll use the same tools set in the evening to work on your own software projects as well...


  • Registered Users Posts: 1,815 ✭✭✭imitation


    Jim2007 wrote: »
    Well first of all it does not cost money as you suggest, you'd be hard pressed to find an IDE as good as the express editions of visual studio in the OS community.

    Agreed, Visual Studio is a brilliant IDE, if something as easy to use is available Java I would be delighted to be corrected.

    In my opinion its popular for 3 reasons, which kind of feed into each other

    1. Its easy to use and to get to grips with. As well as this stuff like intellisense stream lines things. Debugging, breaks, watches are all easy to implement and work reliably. This basically cuts down on development time, alot of it monkey work (silly things like missing braces, waiting for debug sessions) as far as I can see. Mind you would probably a have a different opinion on this if you did any MS Sharepoint development, building .dlls, installing features, finding a problem, doing it all again.

    In my experience labour is always the most expensive part of most jobs, and there aren't too many minimum wage programmers out there. If a job can be done 20% faster in .net over other options then the amount displaced can easily offset the cost of a license.

    2. Its commonly demonstrated in colleges, I did an engineering course and the only non MS IDE we used for app creation was borland c, for a few lab sessions.

    3. Its common and its Microsoft so its a relatively safe bet.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    imitation wrote: »
    Mind you would probably a have a different opinion on this if you did any MS Sharepoint development, building .dlls, installing features, finding a problem, doing it all again.
    FWIW, I do a lot of SharePoint development and generally don't find much of an issue. If you develop against a local SharePoint instance then Visual Studio (and in particular Visual Studio 2010) works really well against it. Depending on what specifically you are developing, you can debug pretty much as easily as a normal ASP.Net application. Some things, like site templates or custom column types, are inherently trickier to debug, but I find most things, such as web parts, event recievers, application pages, timer jobs etc, debug really well.


  • Registered Users Posts: 1,815 ✭✭✭imitation


    stevenmu wrote: »
    FWIW, I do a lot of SharePoint development and generally don't find much of an issue. If you develop against a local SharePoint instance then Visual Studio (and in particular Visual Studio 2010) works really well against it. Depending on what specifically you are developing, you can debug pretty much as easily as a normal ASP.Net application. Some things, like site templates or custom column types, are inherently trickier to debug, but I find most things, such as web parts, event recievers, application pages, timer jobs etc, debug really well.

    Would this by any chance be new in 2010 ? I did the development course for 2007, the webpart module was pretty half a day of me creating guids, sticking stuff into the GAC, writing feature.xmls, finding something wrong and starting from scratch. I never really did anything serious with it afterwards though.


  • Advertisement
  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    imitation wrote: »
    Would this by any chance be new in 2010 ? I did the development course for 2007, the webpart module was pretty half a day of me creating guids, sticking stuff into the GAC, writing feature.xmls, finding something wrong and starting from scratch. I never really did anything serious with it afterwards though.
    Oh yeah, that stuff was a real nightmare to work with.

    There were extensions released for VS2005 and VS2008 that helped, Microsoft release a few versions of VSeWSS (Visual Studio extensions for Windows SharePoint Services), and there were some 3rd party extensions too. They helped a huge amount and automated nearly all of the XML stuff, building WSP solution files and so on.

    Then in VS2010 they included SharePoint 2007 and SharePoint 2010 projects as first class project templates/wizards that take care of just about everything. If you have a SharePoint instance in your development environment you can even just create a new SharePoint project from one of the templates, hit the 'play' button and start debugging straight away, as easily as you would a simple web application. They've also added some wizards that let you build a site through SharePoint, export it out and convert it to a Visual Studio solution which is great for rapid prototyping and then adding more advanced functionality.

    It's a huge improvement over all the handcrafted XML files that used to be needed.


  • Registered Users Posts: 1,311 ✭✭✭Procasinator


    komodosp wrote: »
    I was just thinking this last night... Why do people write websites using .NET? It costs money, the coding is more complicated if you're not using MS's IDE (than PHP/HTML)... You can only have one form per page...

    Yet it seems to be more popular... ??

    There could be a few options, and you need to distinguish between Web Forms and MVC.

    Assuming you mean Web Forms, some reasons could include:
    • Allows for quick and dirty. Useful for RAD and prototyping. Can also be it's downfall.
    • Somewhat related to the point above, but it abstracts far away from HTTP and it's stateless nature and offers a more desktop development model (event-driven and with things like view state).
    • The tool chain (i.e. Visual Studio) and integration between MS products or libraries/devices that a dependant on the Microsoft platform.
    • C#, and maybe to some, VB. A lot of people would be of the opinion that C# is a better language than Java and other languages in the similar class.
    • Less choice: Most things have a prescribed way of doing so. Not always a good thing, but people generally find it much easier to choose a framework in ASP.NET land (for most people, it boils down to Web Forms or MVC, and if people don't about MVC than they probably don't even know there is an alternative) where as in PHP there is a myriad of choices. The simpler choice also means there is a general knowledge and language around the core technologies and often good documentation and discussions around the libraries.
    • Related to the point above - because Microsoft produces most of the libraries used this may instil confidence in the maturity and future of the software used, unlike an open source project which may or may not be active in the future.

    Saying all that, how would you define popular? Companies developing in it, websites deployed of it, etc? I would reckon it would have a lot of enterprise customers and small shops, but not a whole lot in between. The only public high-traffic websites I can think of is StackOverflow and other related sites, which use ASP.NET MVC, and Plentyoffish, which ignores the web controls and is basically just doing http handlers.


  • Registered Users Posts: 2,791 ✭✭✭John_Mc


    stevenmu wrote: »
    Oh yeah, that stuff was a real nightmare to work with.

    There were extensions released for VS2005 and VS2008 that helped, Microsoft release a few versions of VSeWSS (Visual Studio extensions for Windows SharePoint Services), and there were some 3rd party extensions too. They helped a huge amount and automated nearly all of the XML stuff, building WSP solution files and so on.

    Then in VS2010 they included SharePoint 2007 and SharePoint 2010 projects as first class project templates/wizards that take care of just about everything. If you have a SharePoint instance in your development environment you can even just create a new SharePoint project from one of the templates, hit the 'play' button and start debugging straight away, as easily as you would a simple web application. They've also added some wizards that let you build a site through SharePoint, export it out and convert it to a Visual Studio solution which is great for rapid prototyping and then adding more advanced functionality.

    It's a huge improvement over all the handcrafted XML files that used to be needed.

    Yeah I absolutely agree. Coding for Sharepoint 2010 is soooo much easier using VS 2010. One click deployment, easy debugging and loads of templates to work from.

    Can't help thinking it should've been like that for MOSS 2007 as well though


Advertisement