31 July, 2007

Templates and themes and skins...OH MY

Templates, templates, templates!

One of the great new features of ASP.NET in the 2.x/3.x framework are templates. Short story, templates are just what they imply, the create a basic framework for you ASP.NET application, into which you stick your content.

We all like sites that are intuitive and easy to navigate. Before now, the way we achieved this was either through frames, user controls and/or simply copying code to all the pages. This would get the breadcrumb trail and the left margin links and the header an all that great stuff. The most efficient, IMO were user controls. You create a control, and stick it on each page, then if you needed a change, you just change the control, not having to bother with the other pages.

Templates work in much the same way, but they go beyond that. With ASP.NET 2.x you can apply themes and skins to your site by simply identifying which one to use. You can have blue skins, and red skins and purple skins. And you can allow the visitor to select which skin they like best, and load that one for them.

Themes are a little more in depth. Anyone familiar with blogger or wordpress or other blogging formats will understand the themes idea. A theme defines the layout and module content of the page. What I am referring to as module content in this case are the little applet type things one finds on pages. Like the aforementioned breadcrumb trail, the header, the footer the sidebars, the ad space, the blog rolls or other links. Basically, everything that is not your main content, that you want viewable on every page.

There are a plethora (gosh I love that word - plethora - it just kind of rolls of the tongue, doesn't it?) of pages out there with information on how to use templates, and with some digging, one can find instructions on how to make templates. Please note, templates,skins and themes make extensive use of CSS. If you don't understand CSS, it would be a really good idea to learn more about that first, because it will only frustrate you in the end!

One of the best sources I have found for theme information and instruction is Microsoft's ASP.NET Quickstart Tutorials. This is setup so, if you know the basics, and are familiar with ASP.NET 1.1, you can jump right into what you are looking for.

If creating your own template seems to daunting a task, you can download several templates from the MSDN site, then customize as you see fit! The templates are available in both VB and C# source, so which ever you use, you can use these templates.

Over the next few weeks (hopefully not that long, but you never know). I'm going to create a template from scratch (hopefully it will be visually appealing, but again, you never know), and use this site to document my efforts. The template I am going to create will be for a blog. I have been (as stated in other posts I think) lamentful that there is really good, easily usable and easily findable blog software written in ASP.NET (especially C#). So I am going to create blog software to do that. First, I must create the database though, and for that I am going to borrow heavily from the mySQL database used for WordPress blogs. That database has pretty much everything I can think to need, but there are something I think I would do differently, so I'm going to use the schema as base point to start from. The database will be created using Microsoft SQL Server 2005.

Hopefully, but the end of the week, I'll have a database diagram that I can post here and (if anyone is actually reading this) can get some feedback on.

Until then, take care, and thanks for visiting! (seriously, you can leave comments and everything!)

11 July, 2007

Spex

Something that we didn't really do at my previous job was functional
specifications for projects or applications. Well, that is not entirely
accurate. What I should say is that we didn't do these before we started coding the application, but once it was all done and complete, then we would write out the specs. Amazing how all of our code matched perfectly to the specs and design docs.



This puts me at somewhat of a disadvantage as now I am supposed to
write up a functional spec for a project. Up pops the trusty ol' Google
search engine. This is what I have found regarding functional
specifications for software. There is a whole lot of stuff out there,
but it is very difficult to find the one that really describes things
in a way that 1) is understandable by me and b) somewhat almost fits
the type of project I'm working on.

So far, one of the ones I like the best is the PDF doc "Template for Functional Specifications".

A rather humorous template can be found a Joel on Software.

A rather nice essay titled "Writing Software Requirements Specifications" by Donn LeVie, Jr is informative, but not really much of a sample. I'm much better with looking at how something is put together, then altering it to fit my needs, than I am at reading on how to do it from scratch.

Another template in PDF format is the "Software Functional Specification Template". It is sometimes interesting to see the different methods and styles used to write basically the same information.

Well, I hope these resources help you out some if you need to look at doing a functional spec. If not, well at least it was a short post, and you didn't waste too much time on it!

Have Fun!


Technorati Tags: , , , ,