What is the Services Layer?

30 Jul

Services Layer

This layer sits between the Web and Data Access Layers in the N-Tier process. It contains scripts called services which tell the Data Access Layer which stored procedures to call from the database.

Tags: , ,

What is N-Tier?

30 Jul

N-Tier

This is the name of the process of developing in ASP.NET, using a programming code ( like C# for example) to tell the web pages what to display and the database language SQL to query the database. The process uses three ‘Layers’ in between the browser and the database.

The top layer is the Web Layer and this is the interface between man and machine.  The data on the web pages and the way they function is achieved by the Services Layer calling the correct stored procedures from the database.

Beneath this is the Services Layer, which contains the scripts that tell the Data Access Layer what information to pull from the database.

The diagram below from Wikipedia is a pretty useful overview. I’ve put a breakdown of what’s in each layer on the right.

Tags: , ,

What’s the data access layer?

30 Jul

Data Access Layer

This is where the stored procedures are held and they pull the relevant information from the database.

Tags: , ,

What’s a control?

30 Jul

Control

This is a bit of code that tells a part of a webpage how to act. Controls are usually used for bits of code that need to be on several pages, so for example, it might be a ‘Help’ box that needs to appear on a few different pages of the site. The designer can then use the control to easily insert the box on different pages without worrying about the styling and the information called.

Tags: ,

What is C#?

30 Jul

C# (C Sharp)

This is the name of (apparently the best) coding language. It looks a bit like this:

class LINQQueryExpressions
{
    static void Main()
    {

        // Specify the data source.
        int[] scores = new int[] { 97, 92, 81, 60 };

        // Define the query expression.
        IEnumerable<int> scoreQuery =
            from score in scores
            where score > 80
            select score;

        // Execute the query.
        foreach (int i in scoreQuery)
        {
            Console.Write(i + " ");
        }           
    }
}
// Output: 97 92 81

…and communicates all the way between the Web Layer and Data Access Layer. Developers use programmes like Microsoft Visual Studio to write their code.

Tags: , ,

What is ASP.NET?

30 Jul

ASP.NET

This is a Microsoft framework that is used for building websites. Some developers prefer to use other frameworks like Linux.  If a developer uses Linux, they usually cannot work in ASP.NET too. Unless they are complete geniuses of course.

Tags: , ,

What’s a .aspx page?

30 Jul

.aspx page

This stands for an Active Server Page (not sure what the x is for?) and these pages exist in the Web Layer. It is a page that can be viewed in a browser. For example http://www.lovemoney.com/news/get-the-best-deal/insurance/revealed-the-top-10-burglary-hotspots-5208.aspx

If you are funky and use URL rewriting with MVC, you don’t need to use .aspx on the end of URLS!

http://www.lovemoney.com/feedback/onlinebanking

Tags: , ,

What’s a .ascx page?

30 Jul

.ascx page

This is a page that exists in the Web layer. It is called by a .ascx page because it is a control which is an instruction for how that bit of code should look and act. These pages aren’t viewable in a browser unlike .aspx pages.

Tags: ,

MVC: a brief overview for non-technical product managers

8 Jul

Our tech team have been using a new architecture – MVC our website, so for other non-tecchie product  managers who might be involved in using this, I thought I’d try and explain my take on it and give an example of what our team has built.

Apparently one of the benefits of using MVC is that development is quicker because there’s less code to write and code can easily be reused, more easily than when using N-Tier.

So what is MVC? I’m no expert but Colin (our in-house pro) has explained it, (and he has written some really useful tips on his blog  including how to upgrade your system to use MVC) so I’ll try and write it down as best I can.

So, MVC stands for model view controller, which represents the 3 different parts of the architecture.

Model

First of all is the model. This contains the entities, which are like templates for how the tables in the database should look. In the N-Tier process, a whole load of stored procedures would need to be written to tell the Data Access Layer what to pull from the database.  However, we’ve used Entity Framework which simplifies access to the tables because it ‘understands’ how they are structured, so negates the need to write bulky stored procedures and mapping.

View

Then there’s the view, which shows how the page will render using HTML. This is the part that the designer will style.

Controller

The controller gets requests from the user and gets the relevant data from the view and the model to display on the screen.

The diagram from Wikipedia is a handy way to visualise the flow of information in MVC

“Model-View-Controller concept. The solid line represents a direct association, the dashed an indirect association via an observer (for example).”


Colin’s built our new feedback forum for the online banking part of our website. It works really quickly.

This is the main landing page for feedback for online banking. As you can see, there’s a distinction between public and private threads.

Users, if logged in, can start a discussion (pictured above) and reply to threads (pictured below), tagging them as ‘Helpful’ if they found them so.

In terms of breaking down and estimating the work, it seems like it got broken down a lot more that when using N-Tier.

Here’s a sample of the kind of tasks the work was broken into:

As you can see, most of the work is 1 or 2 hour chunks, instead of hefty ‘stored procs’ work for example.

The great thing about using MVC means that if any other areas would like their own feedback forum, it’s now a pretty simple job, a case of changing a few headers instead of writing and testing lots of new code.

Nice!

Tags: ,

Rework – read it!

30 Mar

Enjoyed reading Rework over the weekend.

The idea of taking blog posts to create a book meant that it was easy to read, visual and the ideas seemed to stick in my head.  It’s useful for anyone whether they are working in a day job, thinking of starting their own business or anywhere in between – it’s a ‘life skills’ type of book.

I found it refreshing the way they encourage creative thinking and efficiency instead of stress and slog to help you get where you need to be.

There’s one chapter called ‘Planning is Guessing’ and, as someone whose main role is supposed to be  ‘planning’, I was curious to know more about this particular viewpoint!

The arguement here was that long term plans can give a sense of control, but if are rigidly observed can end up being restrictive. Whilst I agree that it’s impossible to know what’s going to happen, I think there needs to be some kind of direction in the short term – even if a guess is the best anyone can do. On that note, Colin has taken to sending me ‘guesses’ instead of ‘estimates’!

So I don’t think the issue is the idea of  planning itself, but rather the the way we adapt and incorporate the present into our future plans.

Time to go and get some ‘guessing’ done!

Follow

Get every new post delivered to your Inbox.