Whole load of large scale website questions

Associate
Joined
19 Jul 2006
Posts
74
Hi,

I have so many questions I don't know where to start. I'm a decent C# developer but not too great with Web technologies but I'm learning by doing the Microsoft Certified Professional Developer qualification. I'll be using C#, ASP.NET 3.5, SQL Server 2008 and Visual Studio 2008.

Questions

1.1) How can I use E-Commerce and what is the best open source code for this for .NET 3.5 and ASP.NET.

3) Will developing using Visual Studio built in controls stop my website from working with browsers other than IE.

4) Are there other useful, well known .NET Web Controls out there that can be useful.

7) I was planning on using a cookie to keep a user ID and maybe some other user preferences and then retrieve the users details from the database and store them in SessionState. Is this the right way to go and what about people who have cookies turned off.

8) The .NET library provides some stuff to do authentication and authorization, so should I use this instead of making my own custom login as in Number 7. What are the advantages and disadvantages of this.

9) I have been using Enterprise Library for the back end stuff but has anyone used the Web Application Block (Cant remember its exact name).

Answered

1 Q)Visual Studio, Dreamweaver, etc. what to use
1 A) Visual Studio but try to avoid WISYWIG

2 Q) What of Javascript and Ajax and their integration with Visual Studio.
2 A) Use Javascript to enhance existing functionality and AJAX for server callbacks. Use Javascript jQuery or Prototype frameworks.

5 Q) Are there other libraries of code which I could use.
5 A) Look into MVC for ASP.NET

6 Q) Can I host a website from home and how?
6 A) I can host a website from home but will need a static IP and decent bandwidth

10 Q) What of CSS
10 A) Use CSS for colours, decorational images, sizing, positioning, etc.

11 Q) HTML vs XHTML
11 A) Stick to XHTML (I prefer standards)

12 Q) What of XHTML and CSS Validation?
12 A) Use http://validator.w3.org/ and another one for css on the W3Schools website
 
Last edited:
I'm not an ASP developer but i'll take a crack at some of your questions:

1. Visual Studio should have built in support for CSS / JavaScript from what I remember, so there is no need to use an alternate editor for those file types. Most other IDEs like Dreamweaver / Eclipse are alternatives to Visual Studio and as such don't provide any integration. If you're developing C# + ASP.net, stick with Visual Studio.

2. Ideally your website should function perfectly well without the use of javascript. You can then add javascript to enhance the existing functionality, such as visual effects or using AJAX for background loading (i.e. loading new content without having to do a full page request). Look into using javascript frameworks like jQuery or Prototype as it's a lot easier than building your own.

3. No idea, but if it's standards compliant then usually most browsers will handle it reasonably ok. I find developing for Firefox and then fixing visual bugs in IE to be a lot quicker and less painful than developing for IE and then attempting to get it looking right in other browsers.

6. Yes you can host a website from your own home, although it's probably better just to buy some cheap hosting (not sure what a cheap ASP.net host charges these days, but i'd be suprised if you can't get something for around £50-100/year).
If you're going to host at home, then try and get a static IP from your ISP. If you can't do that, try a dynamic dns service like www.dyndns.org, so that you can give out a fixed domain name and the dns record will be automatically updated if you receive a new IP from your ISP.

10. Anything that effects the presentation of your website (colours, decorational images, sizing, positioning, etc) should be in the CSS - you should avoid performing any styling in the html source itself.

11. Some folks will tell you that HTML is evil and ancient history. Others will tell you that you can't correctly use XHTML because you're supposed to send the "application/xhtml+xml" mime type and IE doesn't properly support it (and even if it did, and your markup was broken, then the page would be fubarred, the world would stop turning, baby kittens would perish, and chuck norris may even cry).

The truth is, it's down to personal preference. I find the stricter syntax of XHTML helps when I'm coding because I find it easier to debug problems and it encourages you to keep structure seperate from styling.

12. Yep, it's at http://validator.w3.org/ for checking html/xhtml and they also have a css one if you search around.
 
Thanks, that was a pretty good crack at it :) and answered most of my questions but I'm still not sure about using Visual Studio as quite a few people seem to complain about standards. I'm going to take a look at a trial version of Dreamweaver to see if its any good.
 
Thanks, that was a pretty good crack at it :) and answered most of my questions but I'm still not sure about using Visual Studio as quite a few people seem to complain about standards. I'm going to take a look at a trial version of Dreamweaver to see if its any good.

It's quite possible you can hand code the html to be standards compliant - most WYSIWYG editors make pretty shoddy code.

I think there's recently been an official MVC framework released for .Net so it might be worth checking that out.
 
By MVC you mean Model View Controller? I was wondering about this. I do Windows forms and use Model View Presenter (slight difference). Any idea what it was called?

Thanks
 
+1 for Dreamweaver in code view. (used for PHP coding which I know like the back of my hand) - highly recommended.

All though I'm loving the simplicity and ease of using Visual Studio (only been using c#.net for 12 months on and off)
 
Adam, what are your opinions on the code generated by Dreamweaver vs Visual Studio. I'm downloading a trial version of dreamweaver as we speak to test it out.
 
1) So far I've been using Visual Studio to learn about ASP.NET but what other editors are there (to edit other stuff like javascript, css) and how do they integrate with Visual Studio (I'm think about things like Dreamweaver which I have never used, surely you use Visual Studio to edit the code behind files). I need a detailed answer on this.
You can write CSS and Javascript with no issue in Visual Studio. In fact it's a pretty excellent editor, with syntax highlighting, code hints and all the stuff you'd expect from a fully-fledged IDE. If you were solely working on front-end code, I'd recommend avoiding it due to the app's performance - huge memory usage and very clunky at times.

However, since you're working with code for both front and backend it does have a lot of benefits. In my experience, you're going to find yourself slowed down in a big way by jumping between editors during development. While I'm normally an advocate of simple text editors, for .NET projects I don't think there's a better choice than Visual Studio for editing all the code in your project; be it C#, CSS, HTML or anything else.

3) Will developing using Visual Studio and its built in controls stop my website from working with browsers other than IE and in general is the code generated by Visual Studio any good standards wise.
The code generated by .NET 2.0 controls is decent enough. Yes they do produce valid code. Although they can sometimes be a little verbose with classnames and the like, and perhaps not ideally structured, they're cross-browser compliant, accessible, and well thought out. However, I tend to work with custom controls where you can have better control of the generated markup. There are also web.config options to ensure markup compliance

However, there are some inherent issues with the .NET framework (when not using the aforementioned MVC) that mean you may have trouble being completely valid. For example, the hidden fields used to handle ViewState will not pass validation without some heavy-handed workarounds. However these are only warnings, and you should have no issue creating valid pages (producing no errors) with Visual Studio and .NET. One caveat is that the single-form model often presents a number of accessibility and usability issues, that are more problematic than just ensuring code is valid. As mentioned above, invest some time in checking out the available MVC options for .NET.

As for whether your site will work cross-browser, that's down to you. As long as you write cross-browser compatible CSS and javascript, then you'll have no problem. I can't comment on the WYSIWYG editor in Visual Studio, as I never use it. I'd highly recommend avoiding it however, and always hand code your markup, CSS and Javascript. WYSIWYG as a whole will generate much worse code than that which you could write yourself.
 
Last edited:
Back
Top Bottom