ASP.NET

Discussion in 'Website Creation' started by hjoseph7, Jun 8, 2011.

  1. Anybody use ASP.NET to develop web applications ?
     
  2. Perhaps ASP.NET is the largest used tool to build web sites. Possibly Java tools come close. There is an array other web development tools that are even simpler, but perhaps provide lesser capability, e.g. reputable one is Dreamweaver.
    Some web development tools are free, and are good to start and get your feet wet, but shortly your web building appetite will outgrow them.
    If you are serious about it, and can spend a year on using and learning, then get Microsoft Visual Studio, version that allows web developments.
     
  3. Harry: It's certainly a popular dev tool, usully used for larger projects that will go through a more complex dev/support lifecycle. Will you be connecting to databases, managing session, doing anything transactional, etc? Big learning curve, if you're just trying to put up some pages. Class ASP is a lot easier to digest and to build into a few pages here and there where you need dynamic, server-side scripts to handle simple tasks.
     
  4. "Will you be connecting to databases, managing session, doing anything transactional, etc?"

    The answer is yes ! As part of this class I am taking, I had to download Visual Studio 2010 Framework 4, to my computer. The entire operation took about 2+ hours and the sofware hogged up allot of space on my hardrive. The book that came with this class warned that ASP.NET can affect your operating system, so they recommend using a computer that is not your primary work station.

    So Microsoft expects the average person to have an extra computer lying around just for these purposes, give me a break ? So far I experienced problems with my Hotmail email account and now my MSN page cannot render any images. Hopefully nothing else got screwed up.

    Another problem I'm having is that whenever I try to create a website, I can't get passed the "default template" the software came with ? I either have to incorporate my pages into the default template, or the thing wont work !
     
  5. Ummm....
    No offense, but if you are a developer, Microsoft expects you to be building your primary workstation around this. Kind of like a videographer builds their system around Final Cut/Adobe/take your pick of other editors.
    Personally, as a web developer, .Net offers a lot of nice tools, but I never found it as easy to work in as PHP. Not sure why, but it just doesn't click for me. As for Visual Studio, I have only used the express versions. I never had a problem creating a site or getting anything to work in it. Perhaps you need to create a new site from scratch inside of Visual Studio?
     
  6. Actually, Harry, yes. Most software dev types I know work with either multiple virtual machines, or more than one physically separate computer for dev tasks. This way than can experience output and the process on diffent platforms, and not worry about the machine they're using needing to be burned down and reconfigured on a regular basis.

    If you're having trouble with your web browser, make sure you're using a current one, consider using compatibility mode for sites that are having problems, and think about using Chrome or Firefox or some other browser if IE's giving you friction.
     
  7. I don't know maybe something happened during the download or I'm having some compatibility issue. In class I was able to create my own website without any problems. At home on my computer it has been extremely frustrating. Framework 4 comes with a default Template (config files, folders, styles, Master page, content page, default page) that automatically get created whenever you choose FILE>NEW [Create new Website]. This template comes with code that automatically redirects you to an ASP.NET Login page no matter what you do. Once you login nothing happens ?

    You can choose [Create Empty Website] that bypasses the Template folders altogether, but I haven't been able to build a Master Page that way. Some of the excercises in the book require you to build a "Master Page" that will control how all the other pages look on your website. For expample if I wanted all my pages to have a logo + Welcome to Joe Sponge's Website + the Time + a Menu + a Footer, I could create a Master Page with all that information which would display on all of my pages. Great tool if you have 50 or more pages on your website. If something changes then all you would have to do is change the Master Page instead of changing all the other pages.

    The problem I'm having is trying to create a Master Page. When I try to create and Launch a Master Page, I get redirected automatically to the ASP>NET login. When I choose [Create Empty Website] and try to launch my Master Page and Content pages from there, I get some type of Prohibition Error. The other pages work OK individually though.
     
  8. Yes, my own site is done is very simple ASP.NET, and is 99% a free open source gallery component. Many prefer PHP, but also for the smaller work, ASP.NET works just fine. Not too many cheap hosting companies support it, though.
    I use Visual Web Developer 2010 Express, nice, free and more competent than I am. Not as stable as VS2008 was, but it's good. The whole alert that it can mess up your system is probably because the book was written when VS2010/.NET4 was still in beta. It's a bit overdone warning, it does not affect the OS that deeply at all. Though Matt's point is true, but for beginning hobbyist development, you won't succeed in the near future in making such a mess of your development PC ;-) However, for testing your sites, you need at least these: IE6,7,8 and 9, FF 3 and 4 and Chrome... And that string of IE make strong cases for virtual machines too.
    The default log-in you get is the default website template setting up the back-end database for several settings.The default created master page (site.master) already contains a login. So, it's looking for the database credentials. On my machine, it has automatically created a SQL2008 database. Do you have SQL Server 2008 set up? Maybe it's missing.
     
  9. Uhm, the existence of those folders does not mean that SQL server is set up, I fear... Check in control panel under Software whether SQL Server 2005 or 2008 is listed; if not, you need to install it (SQL Server 2008 R2 Express is a free download). So, it's an additional application you need to have running, the site needs its functionality to read and write the data.
    Not to be rude, but I have the idea you start learning at the wrong end of the story. Web development is difficult enough because of how the interaction between a browser and server goes, programming is difficult enough as it is, and actually using the development environment is the easier bit, and one that should come last in learning. Master pages are a nice to have, understanding that a webpage can loose a lot of info when it reloads is a must-know. Maybe I'm reading your posts wrong, but for all intents and purposes, you do not need master pages to learn ASP.NET. I'm self-taught in these matters, and I focussed first on programming itself (VB, later VB.NET), first doing Windows-based applications, and now slowly progressing in web development.
    (I've checked the template on my system, I have 2010 version, and it sets up a SQL Server connection by default. Since I've got SQL Server Express on this system, for me it all works)
     
  10. Wouter, my understanding is that he is doing this for a class. Also, I just dumped IE6 in my support (as have many others in the field).
    Harry, the best way I can think of to see if SQL is running is to check the status of it's service. As far as creating the masterpage, you need to make sure that all the right references from either web.config, the page itself, or the page's code file (if used) are in place.
     
  11. create empty site and add a master page (new item... or something like that; it will give you a choice of many many things to add). then create a new page--same way, plus select your master page as master page. if you still cannot debug even this, make sure your firewall is allowing the dev iis to start
     
  12. Zach, yes, I get it is for class, I phrased that a bit wrong probably... it's not criticise what Harry tries to achieve here, but rather to focus on what matters.
    Dumping IE6 - so do I, but a considerable portion of the world still appears to use it. So it depends a bit on your target audience whether you can dump it. If it's for the "normal" audience, then by all means, let's push people onwards to better browsers.
    Vilk Inc, that option to create an empty site does not seem to exist in Visual Studio 2010 anymore. Unfortunately.
     
  13. Real world, for the resorts I work for, we are seeing less than 5% of our costumers using IE6. And IE is maybe just a hair over 50% of overall traffic.
     
  14. interesting :) i admit i took it off after losing patience for its bugs, but... why would they remove the empty project option? oh well, create whatever, then delete everything in the tree on the left and add one html page. run debug
     
  15. The thing is Wouter a few years ago while I was going to schoool for photography, I was also enrolled in the Web Design Certificate program which included classes like HTML, Java, C++, JavaScript, ASP.NET etc. This was back in 2007 so I'm a little rusty. I also have 15+ years on-the-job programming experience.
    Back then, I think they were using SQL Server 2005 with ASP.NET. I was able to develop applications easily with minimal programming, but now I'm trying to get my MCTS Certification which requires allot of programming, or at least pretty good knowlege of it. If I remember correctly I never had these problems with templates and installation with the previous version. Things have gotten allot more complicated since then.
     
  16. Masterpages, to my knowledge, haven't really changed since .net 2.1. So your 2007 experience shoudl still be mostly relevant. Although, my knowledge past 3.5 is a little rusty as my company basically has held at that spot.
     


  17. This is the error message I'm getting when trying to create a simple website(Master Page, Page 1, Page 2) using option [Asp.net create Empty Website], Sorry to bother you guys with this stuff but even my Teacher doesn't know what's going on.

    Directory Listing -- /WebSite10/
    --------------------------------------------------------------------------------
    Tuesday, June 07, 2011 10:48 PM 2,407 MasterPage.master
    Tuesday, June 07, 2011 10:40 PM 290 MasterPage.master.cs
    Tuesday, June 07, 2011 10:48 PM 412 page1.aspx
    Tuesday, June 07, 2011 10:41 PM 277 page1.aspx.cs
    Tuesday, June 07, 2011 10:48 PM 406 page2.aspx
    Tuesday, June 07, 2011 10:41 PM 277 page2.aspx.cs
    Tuesday, June 07, 2011 10:39 PM 312 web.config

    When I click on the link page1.aspx the page renders oK.

    When I click on MasterPage.master.cs I get this error:

    Server Error in '/WebSite10' Application.
    --------------------------------------------------------------------------------
    This type of page is not served.
    Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.cs' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
    Requested URL: /WebSite10/MasterPage.master.cs


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
     
  18. MasterPage.master.cs shouldn't be a page you actually visit. In fact, you shouldn't even be visiting masterpage.master. Page1.aspx and Page2.aspx are the only two pages that should actually be "viewable". Anything ending with ".cs" is a C# code behind page.
     
  19. The book that came with this class warned that ASP.NET can affect your operating system, so they recommend using a computer that is not your primary work station. So Microsoft expects the average person to have an extra computer lying around just for these purposes, give me a break ?
    This is a Windows limitation. Most software you install can affect the OS and all other applications because of the terrible architecture behind DLLs and the Registry, they just don't always warn you about it in the installer. The larger and more complex the application, the more likely something will be affected. And Microsoft's .NET tools are huge. But even a small application can screw up your entire Windows machine. Incidentally this is also why it's so incredibly easy to write malware for Windows.
    *nix OSes (including Mac OS) do not suffer this nonsense. There is a clear, secure division between OS and applications. With very few exceptions, installing an application does not risk slowing down or affecting your OS or the rest of the system. And those exceptions require an administrator to even install.
     
  20. Zach then I clicked on MasterPage.master without the 'cs' extension but I still got the same error message. This class goes pretty fas,t 3 chapters per week and now I'm stuck at the starting gate.
     
  21. Ok, it shouldn't be a viewable page on it's own. The only two should be the page1.aspx and page2.aspx. Master pages are merely a piece of the puzzle that allows the other two pages to work. They are not working pieces on their own.
     
  22. Guys I got it !
    I had to change MasterPageFile="~/Site.master to MasterPageFile="~/MyMaster.master on the first line of the Default.aspx file. The Default.aspx page was automatically pulling in the code from the Site.Master file. Now it's pointing to MyMaster file which does not have all the ASP.NET login stuff. Finally I can get some work done, funny the book didn't mention this. Thanks !
     
  23. *smacks head* Doh, why didn't I ask that one?
     
  24. Strange postings.
    ASP.net is a league apart from php, in that has an incredible framework behind it. This is like comparing a snapshot camera with a Canon Mark 1. In your pocket for fun excursion, the snapshot is better and you do not need to know as much, you just use it; but for weddings, professional shoots, etc, you get the idea.
    For tools, Visual Studio is probably the best development environment there is for developing code to support the dynamic aspects of your website, but for general html development, Expression Web would be a better fit and it also supports PHP if that is your choice. Years ago, Dreamweaver was the tool of choice for html development not because it was great, but simply because it was way better than anything else out there. Frontpage was somewhat of a joke, So when Expression Web came out it was a welcome relief (i.e., much more stable, faster, and cheaper). It has continued to develop and version 4 is mature. Since Adobe purchased dreamweaver, i am sure they have kept it going and improved it, but it was on a bad code base to start with.

    PHP is a scripting language, that is 'great' for small projects, but many larger (but not all) projects fall apart with it partly becuase of the limitations of the language (it is a script language), and partly because there are many people using it with poor coding practices. The code (and seperation of code from your front end) is generally much cleaner in vb.net or c# which are the primary language used to code against the .net p latform with.

    Finally 80 % of the work is not your front end (what people see in your website), but in building the tools for the backend management of it - in this regards it would be far better to start with a solution out there that covers most of what you need.

    In terms of creating your own website, for fun great, but if you intend this to be for a professional use, then there I would recomend getting some help.
     
  25. Daniel, your post on the registry and DLLs has no relevance. The .NET framework hardly suffers any of this problems that plagued older versions of Windows. Aside from that, what is the use of pointing out the "superiority" of Unix when we're trying to solve an issue with ASP.NET? Please keep these eternal Windows versus Unix debates out of it.
    Harry, I feel incredibly stupid.... I had to do the same after upgrading my site project from VS2008 format to VS2010.... sorry I did not think of that before and sent you off in the wrong direction. ~smacks forehead on keyboard~
    And my apologies if I sounded like doubting your skills, it was not meant as such, the sequence of things just sounded weird to me. Anyway, glad it's working now. By the way, if you need to create a photogallery with .NET, Notes4Gallery will make easy work of it ;-)
     
  26. Daniel, your post on the registry and DLLs has no relevance.
    Please scroll up to Harry Joseph's post at 2011-06-08 1:41 PM. And I quote: The entire operation took about 2+ hours and the sofware hogged up allot of space on my hardrive. The book that came with this class warned that ASP.NET can affect your operating system, so they recommend using a computer that is not your primary work station.
    Back to your post: The .NET framework hardly suffers any of this problems that plagued older versions of Windows.
    Then explain to me please why, about 3 months ago, uninstalling a seemingly unrelated, non-development, non-Microsoft application from one of my Windows virtual machines hosed not only Visual Studio, but the .NET frameworks as well, forcing me to clean the VM and reinstall everything related to .NET and VS? (Did I forget to mention that I'm a software developer with over 20 years experience developing desktop, database, and web applications for Windows, Mac OS, and Linux?)
    I'll grant that within the .NET bubble the old DLL issues are gone. But the entire .NET layer sits on top of the good old Windows OS and architecture. So there's no true immunity there. The warning in Harry's book is there for a reason.
    Aside from that, what is the use of pointing out the "superiority" of Unix when we're trying to solve an issue with ASP.NET?
    Because I felt like it.
     
  27. Possibly OT, but I am curious, how does ASP and Dreamweaver etc compare to the LAMP stack (with PHP/Python on Linux)? I've never written a single line of code on windows and from a quick look at the asp.net website could not figure out what it is. I still type on a keyboard into emacs and missed the bus when everybody moved to graphical IDEs. Should I be jumping to the ASP/dreamweaver stuff to design a website? Also, how is Xara Developer/Web Plus for designing the front end (and linking it to a database maybe via PHP/Python), or will dreamweaver etc. take care of that too (e.g. I will only have to drag and drop the image placeholders where I want them)?
    sorry for n00b questions, but all the fancy websites make me jealous that I can't simply create one by typing in a text editor any more.
     
  28. Possibly OT, but I am curious, how does ASP and Dreamweaver etc compare to the LAMP stack (with PHP/Python on Linux)?
    I don't really deal that much with Dreamweaver, preferring to hand code my HTML. I have tried it and a few other WYSIWYG editors just to get a design started, but I always end up taking the code out and massaging it myself. Note that Visual Studio incorporates a decent web page editor.
    ASP.NET has a very productive IDE. Nice code editor, good auto complete, help at your fingertips, great debugger. The development cycle is faster, smoother, and more tightly integrated in ASP.NET than in most other web development tools. Then there's the comprehensive .NET framework. This is a blessing and a curse. At times I'm very impressed with how Microsoft handled a particular problem, or with controls and classes which let you accomplish a lot with but a few lines of code. At other times I'm baffled by how over engineered certain components are, and by how much effort can be required to not only do something but do it right. You can spend considerable time just learning best practices and current code patterns in ASP.NET, or trying to solve some obscure bug.
    PHP is a bit leaner and meaner. Again, this can be a blessing and a curse. You can skim the PHP framework pretty quickly, and you don't have to spend much time pondering best practices or why the class you need is nested 12 layers deep. But you also don't get the nice controls or clean separation between web page and code that you do with ASP.NET. The ASP.NET page event and life cycle is really well thought out for the post back model, and not too shabby for AJAX either. PHP is a bit more raw: you spit out HTML. Also, I've never found a set of tools which give a comparable PHP development experience to Visual Studio's IDE.
    I'm not experienced with Python.
    I think the thing I hate most about ASP.NET is that it locks you into Microsoft's OS and web server. (Unless you want to deal with Mono.) Fortunately you can at least ditch SQL Server for Postgres or MySQL. But Windows plus IIS is simply not as lean or robust as *nix and Apache (at the risk of bringing that up again). I certainly recommend ASP.NET to clients where it's appropriate, and I generally enjoy coding in it. There's a lot that's nice about it. But I never quite trust the servers.
     
  29. "Possibly OT, but I am curious, how does ASP and Dreamweaver etc compare to the LAMP stack (with PHP/Python on Linux)? I've never written a single line of code on windows and from a quick look at the asp.net website could not figure out what it is."

    Dreamweaver lacks the the Data Base and code-behind features of ASP.Net. It's great for developing front-end pages or web sites on the fly. On my job we used Dreamweaver to develop the entire front-end application, because it was easier to do than with Java. I have a copy of Dreamweaver that came with my Photoshop Creative Suite package, but I never used it much. I much rather go in and type the HTML myself.

    The thing about these IDEs althought they are convenient, they don't do much for developing your programming skills. Allot of the programming is done by pre-packaged routines that defy human understanding. Comming from a procedural programming background, I found it difficult trying to adapt to the "OOP" Object Oriented Programming languages that are in use today.

    When I first go into programming, we used high-level languages such as COBOL, PL1, CICS, Fortran that were more english like and much easier to learn. Once you learned a certain feature, or had a good grasp of it, you were then ready to apply it to complicated applications. Programming back then was like riding a bike, once you got it, you got it. ! Can't say the same about todays languages, they seem to change like the weather.

    For example a basic COBOL programing book was about 100-250 pages long. These days a basic programing book in Java, or c# is 1000+ pages long. I really feel sorry for the kids that have to learn all this stuff.

    Back in the days they were 2 types of programing, Busines and Scientific. The business side consisted of high-level languages such as COBOL, CICS, ADABASE, PL1 etc while the Scientific languages consisted of languages such as APL, C, LISP etc. IBM with their MVS platform dominated the business programing side, while Unix dominated the scientific side. The two were like apples and oranges but competed with each other like Nikon and Canon.

    With the emergence of PC's (Personal Computers) and the Internet. The scientific side of programming languages finally won out after years even decades of playing second fiddle. These scientific programming languages were closer to the the compiler, or assembly languages used by the Systems staff . IBM/MVS had Assembler, but only a handful of programmers wanted to deal with it. It was just too hard to learn !

    Fast forward to the 21st century and languages such as Java, C+ PHP, have come to dominate the market because of their flexibility their support for GUI and their adaptation to internet based applications.

    Having prepackaged routines stored in libraries can be a boon to some, but a curse to others in that they never seem to get a good grasp of what they are doing. It's almost like putting your camera on 'P' mode(Automatic mode) and firing away, hoping things turn out OK. At least that is the way I see it.

    ASP.Net is Microsoft's answer to Java. Lately it has been spreading like wild fire. Allot of Government agencies are actually switching their Java J2EE based apps to ASP.NET apps. The thing about Java although it's a very flexible language it is extremely difficult to implement and keep track of. J2EE platform is a conglamaration of complicated files & tables that support Java the programming language. Unfortunately, it takes years to master.
    Years ago a Developer did not have to know about the inticate implementation details of a particular language, they left that to System Programmers and Data Base Administrators, these days it's mandatory.
     
  30. Thanks Daniel and Harry for excellent reviews! So am I right in understanding that ASP.net is a set of libraries to generate html and interface with the database backend (like php, but OO)? Then that still means coding in a text editor (except probably Visual Studio which has a rudimentary WYSIWYG)? Of course, with OOP not having a handle on the libraries is like knowing your camera but not having any film (or memory).
    I was hoping to skip this whole mess altogether and use a WYSIWYG editor and right-click to add my database queries at the right places. Maybe we are already there (with some e-commerce and album package)? But it's true, libraries and classes have exploded very very fast, a good thing even if I feel a bit lost. Not at all like how people from the 1960s thought programs would be written by computers in this century. I started with Fortran and Pascal's ending years myself.
    So the only disadvantage I see to ASP (from this discussion) is that it pulls in the whole tome of libraries and makes a blotch instead of allowing me to select which individual package I want to install (like my debian box does). In any case, it looks like I should be learning Django instead of ASP (faster to learn and double the productivity of an ASP.net developer). (That should probably be: learning how to use Django classes, too bad browsers don't also natively support python yet.)
     
  31. "So the only disadvantage I see to ASP (from this discussion) is that it pulls in the whole tome of libraries and makes a blotch instead of allowing me to select which individual package I want to install (like my debian box does)."


    No not at all, ASP.NET is very powerful in that it saves you time writing Objects such as textboxes, drop down lists, dialog boxes, menus etc. All that stuff is prepackaged so all you have to do is drag it to your work area and ASP.NET generates the code for you. Imagine if you had to code all that stuff your self !

    ASP.NET is more than just an HTML generator like Dreamweaver it also supports a variety of languages with the main onees being C#(a combination of C++ and Java) and Visual Basic(basically the OOP version of the Basic language). Unlike JAVA, ASP.NET supports a variety of languages such as AJAX, PYTHON, PERL even COBOL .

    When you pull down an Object from the toolbox such as a Button you need to write the code that is going to give that Button a Function such as 'go to the next page'. This is done in the Code-Behind page. The Code-Behind page is where all the programming statements are placed. ASP.NET does not generate any code there you have to that yoursef. What ASP.NET does is it keeps the HTML, XML and the Code-Behind page separate so it's easier to maintain.

    The beauty about the prepackaged Classes in a Hierchy of libraries is that it saves the Developer coding and testing time. The trick is to know what is inside those libraries. So a Developer today is more like a Library Manager because without knowledge of the Classes that are available in a certain library, he/she is basically has to write an app from scratch, just like in the good old days.

    Another advantage of OOP other than savings in deveopment time is that a well written program will usually be much smaller than a typical Procedural Language program. A typical Java program is about a 1/5 of a typical COBOL program although both programs might do the same thing.

    One of the disadvantages is that the Class libraries have become 800 pound Gorillas. They grew from a few thousand classes to millions, which makes it virtually impossible for a normal Human being to know them all, no matter how many years they have in the field. Another disadvantage is the complexity of those languages themselves and how they are being tought and developed.

    The thing about technology is that it is supposed to make our lives simpler, but actually in IT things have become more complex, to the point where when a system goes down, nobody knows exactly what is going on ! It could be a mirriad of things, probabilities and possibilities. Beleive me, I work the HelpDesk at my job and the Client Server OOP based problems are extremely hard to narrow down. While the mainframe problems are confined to a much smaller set of probabilities.
     
  32. Indraneel, the free Visual Web Developer 2010, and its big brother Visual Studio, do have WYSIWYG design. It's not as good as dreamweaver, but better than rudimentary. It also can do many tasks graphically, including connecting to the database, designing the query etc. Undeniably, you can get better results diving into the code, but from what you describe you want, you could actually give the free version a try and see how it works for you.
    As for the disadvantage of the .net framwework... that only affects your development machine and the webserver. Your website visitors do not need the .NET framework at all, just like PHP, ASP.NET puts out HTML to the browser itself.
     
  33. The thing about technology is that it is supposed to make our lives simpler, but actually in IT things have become more complex​
    Very true, but it makes many, including me, a nice living :)
     
  34. I first learned ASP.NET and the C# language in late 2001. I still love it and been around MANY pro websites/Web Apps/ (MVC now) built directly with it and using SQL Server, indeed.
    (10 years ago I used a very basic Text Editor as Visual Studio .NET wasn't even released yet; I learned C# from scratch, but my strong background in C and HTML was a major bonus; I stood up my first website just prior to 1996)
    (And a +1 to Wouter)
     
  35. Actually, depending on how an application is built, I can find using a full framework like .NET rather bothersome compared to just a scripting language, such as PHP. It really is a case by case basis, as with things that are much more of an "application" will benefit greatly from something such as .NET. But for me, we don't do anything too challenging that would really require much more than plucking and placing data in a database. So PHP is easier (although 90% of our sites are currently Classic ASP). And my freelance work is all small businesses which don't require much beyond Wordpress or Drupal.
    So, yes, .NET is good, but if you aren't ready/wanting to use all of it's power, it may be a waste compared to simpler things like PHP.
    And I always get lost trying to remember all the libraries...not sure there hasn't been a time where I'm not sitting on MSDN looking something up. But, that also comes from switching between ASP, ASP.NET (C# 2005), and PHP way too often.
     
  36. Ken you must have been one of the early Pioneers, because ASP.NET hasn't been around that long, at least not as long as Java. Microsoft got tons of cash to develop that program and is making it easier and easier. While Java has been stuck in dooldrums for quite a while now. Their CEO and brains-behind-the-code is now working for Oracle. However Java is not going away any time soon because that is one of the language being used in portable devices such as iPhones and iPads.
     
  37. The thing about these IDEs althought they are convenient, they don't do much for developing your programming skills. Allot of the programming is done by pre-packaged routines that defy human understanding. Comming from a procedural programming background, I found it difficult trying to adapt to the "OOP" Object Oriented Programming languages that are in use today.
    I can't agree with that at all. IDEs and frameworks let you accomplish more and do it faster primarily because you don't have to reinvent the wheel. They help you focus on program design and architect more complex systems. Just by using any good framework you're also exposed to a wealth of good examples in terms of proper interfaces and code patterns. You can then apply those tools and that knowledge to the code that makes your application unique, as opposed to the code that everyone needs.
    We would never get anything done without libraries of code from other people. Even if you rolled your own web server (been there, done that) for some specific purpose, you end up relying on the libraries in the OS to accomplish anything. Nobody starts with bare metal today. If they did computers would still have lots of binary blinking lights and switches.
    I also have to throw in there that OOP is a God send IMHO. I would never want to go back to the days of procedural programming. (Though I hate JavaScript's implementation which is not true OOP.)
     
  38. So am I right in understanding that ASP.net is a set of libraries to generate html and interface with the database backend (like php, but OO)?
    ASP.NET is essentially a form of virtual machine (Common Language Runtime, intermediate code, and JIT compiler), a comprehensive framework for accomplishing common tasks, and a development environment that includes code editor, page editor, debugging, etc.
    Then that still means coding in a text editor (except probably Visual Studio which has a rudimentary WYSIWYG)?
    Visual Studio also lets you view a web page in raw HTML, and the editor support for that syntax is pretty good. You can flip back and forth on the fly between WYSIWYG, and the editor recognizes .NET controls so that you can examine and set properties with the GUI or by typing the text directly. I get a little annoyed with the auto formatting at times, and the JavaScript portion could be better, but overall it's a good editor.
    Of course, with OOP not having a handle on the libraries is like knowing your camera but not having any film (or memory).
    More like having Photoshop and only knowing a couple commands.
    While I'm at it: I highly, highly recommend the book Code Complete by Steve McConnell for anyone who is relatively new to programming. I consider it the Bible of good software architecture. It's not a set of examples to copy and paste. He digs into what separates good code from bad code, and how to design, implement, and manage complex software.
     
  39. Ken you must have been one of the early Pioneers, because ASP.NET hasn't been around that long, at least not as long as Java. Microsoft got tons of cash to develop that program and is making it easier and easier. While Java has been stuck in dooldrums for quite a while now...
    Sort of yes. I eschewed JAVA big time; when C# came around it was if it was written directly for me -- it was love at first site! Being an autodidact I hopped aboard that train instantly.
    I can say though my C# skills have gone a bit rusty as I manage teams now.
    +1 (bravo!) on that CODE COMPLETE rec too. No doubt.
     
  40. So the only disadvantage I see to ASP (from this discussion) is that it pulls in the whole tome of libraries and makes a blotch instead of allowing me to select which individual package I want to install (like my debian box does).
    One last note: ASP.NET makes a whole ton of classes and libraries available to you. Once installed on your server, however, it doesn't really matter if you use a few or all of them. It doesn't necessarily weigh down your web app.
    Regarding Django: I would be very wary of any generic productivity claims. It's not that I don't believe different languages, frameworks, and IDEs have varying levels of productivity. They do. But this is quickly overshadowed by a) how good you are as a programmer, b) how well you know the tool and its libraries, and c) whether or not your tool choices and software design choices fit the task at hand.
     
  41. "Just by using any good framework you're also exposed to a wealth of good examples in terms of proper interfaces and code patterns."
    We were exposed to a wide range of good examples in procedural languages also. Not too many people coded an entire program from scratch, usually there was a Template or a similar program that could be modified to fullfill a need. My beef with OOP languages is with the cryptic symbols that can make debugging a living nightmare. Although things have gotten a little better lately, error messages in OOP languages are vague and can mean any number of things, while procedural languages had more specific error messages. Another thing is the syntax of the language. Things like '{} ', '~/ ' , 'byte()' , ' field = (byte() int a;) ' are not very easy to read when somebody calls you at 3:00AM in the morning.
    This phrase: 'dog mydog = new dog()' is the same as 'Animal mydog = new dog();' maybe I need more experience but is exactly this type of thing that made it hard for Porcedural programmers to switch over. When I took Java in school a few years ago, at first the class was filled with 25 students, mostly COBOL programmers like myself. By the end of the class, there were 5 students standing including myself, maybe it was the teacher, or maybe it was the book, but things like Instantiate, Polymorphism, Serialization, Encapsulation is enough to scare the pants off the most experienced programmers, let alone the general population.
    Actually, you can't compare the two languages, because OOP is mostly an Event Driven programming language, meaning pieces of code are performed due to an Event, while procedural languages are based on one big loop that performs certain functions over and over(based on the data) until the end of file. For online programs such as CICS until the operator logs off.
    Take a look at this COBOL statement Read myfile, perform calculations, at end-of-file close myfile. Simple and straight forward.
    As opposed to this monstrosity: input = new Scanner( new File(myfile.txt)) { catch (FileNotFoundException, FileNotFoundException){ Syste.... While (input.hasNext() )
     
  42. Wow! This thread almost makes me forget I'm on a photo forum! So much of great information, I now have a reasonably good idea of what ASP and dreamweaver does. Also now I know what to look for when comparing web programming software (easy way to create forms, buttons etc, drag and drop, links to other pages or data...) Looks like I'll give visual developers, dreamweaver and django a try. Also, how do commonly available web templates fit into all of this? Now I also know where Xara fits into all of this, although from what I've read elsewhere the code generated by Xara may not be easily manageable (since it looks like I will need to mix the code with ASP/Dreamweaver/Django for forms and dynamic things).
    I did get the book "Code Complete" but haven't looked into it yet. I need to, since I have no formal training in software development. I remember finding out about design patterns when I hit some walls and started to reinvent it myself. But as for OOP, I've been at python for nearly 10 years now and I've never had to look back... gone are the days of mangled C++ and cryptic perl. I've actually had to look at python code from years ago in the middle of the night and it was almost a pleasure. But then, on most of these projects I was the sole architect and developer, even if they ran into tens of thousands of lines... it's both a pleasure and a pain, especially in research work where the main requirement is change.
    bruno = Dog(breed="great dane", age=puppy, name="bruno")
    bruno.wagsTail()
    bruno.barks("woof, woof")
     
  43. My beef with OOP languages is with the cryptic symbols that can make debugging a living nightmare. Although things have gotten a little better lately, error messages in OOP languages are vague and can mean any number of things, while procedural languages had more specific error messages. Another thing is the syntax of the language.
    What language are you referring to? I can't think of very many cryptic symbols in OOP implementations of BASIC, and C# is certainly less cryptic than pure C. I don't really find compiler or runtime error messages to be vague in the environments I use.
    When I took Java in school a few years ago, at first the class was filled with 25 students, mostly COBOL programmers like myself. By the end of the class, there were 5 students standing including myself, maybe it was the teacher, or maybe it was the book, but things like Instantiate, Polymorphism, Serialization, Encapsulation is enough to scare the pants off the most experienced programmers, let alone the general population.
    I think you had a bad teacher ;-)
    An instance is just a particular object which is in memory. Think of it as a particular data structure to which you have a pointer. You can of course have many instances. Each window open on your computer right now would be a separate structure in a procedural language, or instance in an OOP language.
    Polymorphism just means that two different classes can respond to the same function call in different ways. clsDSLR.ZoomIn might change the focal length of a lens, while clsPhoneCam.ZoomIn might digitally zoom into the picture because it can't change the focal length. The point is they both understand ZoomIn so that code which uses them doesn't have to care which it is working with. Either way it gets a magnified shot.
    Encapsulation means binding a data structure, and the functions which manipulate that structure, into one class or object, and hiding everything that the outside world shouldn't know about. It's a way to manage complexity by hiding internal details from other software components so that if those details change, very little related code has to change. If clsPhoneCam gets a zoom lens in version 2.0, then clsPhoneCam.ZoomIn can change to take advantage of that new lens. The code that uses clsPhoneCam doesn't have to be modified in response to this because all the details of zooming in, all the related data structures and routines, are hidden in the object.
    Serialization just means taking an in memory data structure and converting it to/from a format that's suitable for disk storage or network communication.
    Actually, you can't compare the two languages, because OOP is mostly an Event Driven programming language, meaning pieces of code are performed due to an Event, while procedural languages are based on one big loop that performs certain functions over and over(based on the data) until the end of file. For online programs such as CICS until the operator logs off.
    That's not accurate. Getting events from an OS or framework vs. just running in a loop and polling devices is a separate issue. I can understand the mix up though because when you learn an OOP language you generally learn on a GUI based OS, and the frameworks are designed with an event mechanism in mind.
    Take a look at this COBOL statement Read myfile, perform calculations, at end-of-file close myfile. Simple and straight forward.
    As opposed to this monstrosity: input = new Scanner( new File(myfile.txt)) { catch (FileNotFoundException, FileNotFoundException){ Syste.... While (input.hasNext() )
    We're not talking about a concrete example, but I could imagine something as simple as...
    Dim objScanner = New Scanner("myfile.txt")
    objScanner.Calculate
    This assumes Scanner can take a file name and open the file when it's created, and that it knows to close the file after Calculate. Of course I'm not catching exceptions, but I generally catch those at a higher level. If the user selects a command, and that command takes 10 steps to finish, I don't necessarily check for exceptions at each step, but at the function directly called when the user chose the command, the function which coordinates and calls each step. Exceptions are powerful but excessively complex and verbose if you check for them every where. I check for them where I can properly alert the user and safely roll back so they can do something else.
    As to why I think OOP is a God send? Encapsulation. You can radically alter portions of a properly designed OOP application without changes rippling across the entire code base. It encourages the programmer to think about what should be public to the whole system and what should be hidden away in case it changes, and to design by contract using abstract interfaces between classes. The function call clsCamera.ZoomIn should not change because of any particular details in specific types of cameras, or because of changes over time. ZoomIn represents an abstract task that needs to be done, and calling code does not need to know the complexities of that task.
     
  44. I did get the book "Code Complete" but haven't looked into it yet. I need to, since I have no formal training in software development.
    I would actually consider mastery of the theory and material in Code Complete to be superior to the 4 year programs at some colleges and trade schools.
    Seriously.
     
  45. Also, how do commonly available web templates fit into all of this?
    I think you had a bad teacher ;-)

    I used a comercial Web Template to create my Photo website because it was allot easier than doing it myself. Everything was set-up for you, so you didn't have to worry about such things as getting the site to work on different browsers. The comercial template also came with about 5 code-behind pages so you could do your thing with JavaScript. Of course, I have to pay about $12 per month for their services. However it was well worth it in that it took me only about 2 weeks to set the entire thing up.

    I had a terrible teacher for Java. This guy use to stand infront of the class and reads straight out of the book, line by line word for word. What got me over in that class is that somebody recomended the book "Head First Java 2nd edition by Kathy Sierra & Bert Bates". This is the best book on Java I ever read. They use the "Java for Dummies" approach of teaching with plenty of Graphics and funny stuff, so learning becomes a breeze. Although I had taken C/C++ a few years earlier this book really brought it home, I highly recomend it. As far as the syntax for OOP languages, it leaves much to be desired in my opinion, functionally it is a great language just very difficult to read and understand.
    There is no such thing as garbage collectors, constructors, or destructors in procedural languages, this is something we never had to worry about. I/O File handling and Report writing are much easier also, take a look at these staments:

    OOP - printf("row 1: [%d %f] \n", x, y);
    COBOL - display 'row 1: ' x ' ' y
     
  46. Stroustrup has a nice paper on OOP here.
    Daniel, thanks for the big recommendation about Code Complete. Do you know of any other such foundation texts (besides pragmatic programmer and clean code)? The great thing about books like this is that the principles of good design and management can mostly be applied to management in general, in all of life's activities.
     
  47. One thing of interest is that Procedural Languages were developed after OOP languages. The programming language C was developed way back in 1966 and was closer to the Assembly/Compiler line of computer languages. C is the precursor to languages like C++, Java, PHP, SmallTalk, Phython etc.
    Daniel, I think you would make a good teacher.
     
  48. As far as the syntax for OOP languages, it leaves much to be desired in my opinion, functionally it is a great language just very difficult to read and understand.
    Syntax is more of a language issue, not an OOP issue per se. (Though a particular class can be well designed or poorly designed from the standpoint of function naming and usability.) Are you sure you're not just frustrated with C++ or Java syntax? Have you tried VB.NET or REAL Studio?
    There is no such thing as garbage collectors, constructors, or destructors in procedural languages, this is something we never had to worry about.
    Man, you're complaining about some of my favorite things! :) Again, I think it goes back to your teacher. You shouldn't really have to think about garbage collection at all except to avoid a couple pitfalls that will trick it into not releasing memory.
    Constructors and Destructors are just functions that are automatically called when you create an instance (i.e. allocate memory for the data structure) of a particular class, and when the memory for that instance is released because it's no longer in use. So when you create an instance of clsPhoneCam you might turn on the phone and see if it has a signal in the constructor. When that instance is garbage collected because you're no longer using it, your destructor will be called and you can turn off the phone. clsDSLR on the other hand might take off / replace the lens cap in those functions.
    I/O File handling and Report writing are much easier also, take a look at these staments:
    The first statement isn't OOP so much as C++ or Java (they both have printf). I don't remember all of printf's formatting codes or the differences between the two.
    Here's the thing with OOP. Let's say you design a class called clsReport. It has one function which you call Display which takes and prints a line of text. So...
    dim myReport = new clsReport
    myReport.Display("Report Title")
    Note that you could mimic Cobol's display function in terms of what parameters it takes. In fact that's why you created clsReport, because you hate printf. I don't blame you ;-)
    Your boss tells you that's great but he needs a graphically rich report with styled text, graphics, and free form positioning of elements. He gives you a mock up. So you add functions to clsReport to let you output those kinds of reports. You can now draw graphs and pictures and output columns of text with bold and italic and whatever. Then you write a function which gathers data and outputs the specific report your boss wants by calling clsReport. You did such a good job he gives you 19 more reports to create (lucky you), and you write those 19 functions. Now you have a total of 20 reports your boss can produce. In each of those functions you talk to your printer using clsReport.
    Now your boss comes to you and says that's great, but he also wants to be able to export PDF, Word, and HTML files.
    Are you stuck writing a total of 80 functions, 4 for each specific report, so you can get all the different versions? Nope.
    In OOP you can create clsReportPDF, clsReportWord, and clsReportWeb. They can subclass clsReport. When you call clsReport.Display it sends instructions to a printer. But when you call clsReportPDF.Display it outputs PDF code to a file. clsReportWord.Display outputs code that MS Word will understand, and clsReportWeb.Display outputs HTML.
    When you're done, you don't have to touch the 20 functions that create specific reports. They will continue to work just fine. You just pass them an instance of clsReport, clsReportPDF, clsReportWord, or clsReportWeb based on the type of report the user selected.
    That's polymorphism (the different classes understand the same functions but do different things in response) and encapsulation (code using the classes doesn't have to change with new or changing functionality) at work.
     
  49. Daniel, thanks for the big recommendation about Code Complete. Do you know of any other such foundation texts (besides pragmatic programmer and clean code)?
    I'll have to think about that one. A lot of what's on my bookshelf is specific to a particular language, framework, or OS. I will say that it pays to look at existing frameworks and study how the designers did things. You'll learn various design patterns and see different solutions to similar problems, getting a feel for how well each works out in the real world.
    Honestly, the combination of reading Code Complete and really learning my first two OOP frameworks (this is back in the early 90's) advanced my programming dramatically. It's funny because both of those frameworks are now dead (Prograph's class library and Metrowerks CodeWarrior PowerPlant), but the design patterns and principles are the same. For example, I didn't so much learn .NET as I just opened a reference and started using it.
     
  50. Daniel, I think you would make a good teacher.
    Thanks!
     
  51. In just a few hours, I was able to put together some PHP scripts to work on my site and other sites I maintain. They were easy to figure out and test and didn't mess up my workstations at all. PHP is supported by the host I and my clients use. .NET...well, that's another matter.
     
  52. When I look at my PHP and Perl code, I think: "It was very quick and good when I wrote it and helped keep my job, but it won't keep my job now".
    When I look at my C++ (or even python), I think: "Too bad I got fired for taking time to write all this beautiful reusable code."
     

Share This Page