Fremus.co.za

Demistifying Life and Web Development

Archive for the 'Web Technologies' Category

WordPress 2.7 and some other tidbits

Wow, what a difference the Dashboard is. Its a total revamp, and I totally like it. Amazing work these guys put into this Blog CMS.

Today I also experimented briefly with the Extended Desktop feature that comes with some graphics accelerators. I am specifically referring to one that I have running on a HP laptop. What this particular accelerator does is allow you to create an extended desktop,  and with that feature you can run the Presenter view in Powerpoint, which basically allows you to run the presentation without the audience seeing the details of the PowerPoint interface. In other words all they get to see is the Slide Show, nothing else of what you are doing. So, I decided to create a little WPF application that has a width greater than the monitor size, and low and behold it overflows onto the other screen. This is interesting for several reasons. Firstly PowerPoint is not great for everything, and one thing it is not good at is displaying data. This often means that if you have an Access Database you will have to write some VBA code to extract that data and display it. So I thought that maybe the other option could be to write a WPF app that displays content on an extended desktop.  If that works its quite feasible to write better logic for everthing and actually use relational data.

  • Share/Bookmark
Tags: , ,
posted by fr3dr1k in C#,WPF,Wordpress and have No Comments

On that Session-less shopping cart issue

In my post yesterday I mentioned that I would like to develop a session-less shopping cart through the use of web services and classes. Well, I changed my mind a bit because I am not sure if AJAX can maintain state. Can it? How will AJAX retain state? I’m not sure yet, so sessions it is.

There are some important reading bits that need to be covered before you can get stuck into sessions, and its always better to try and understand something as far as possible before you simply jump in and implement it. The first article that proves invaluable (and very important) is the ASP.NET Page Lifecycle where after I can recommend you read the State Management Overview Article to understand the difference between Client side and Server side state management and what each offers. Why is state management such an issue? Well firstly because HTTP is stateless, after you make a request to a web server for a web page there is no further communication between you and that server. So to create a state, you use a state management technique, which can either be client or server side. With either technique you have several options and each option has some advantages and disadvantages.

My fear with session state management was the performance hit my server might take, but I have not really tested it enough to make that assertion.

  • Share/Bookmark
Tags:
posted by fr3dr1k in ASP.NET,Web Development,Web Technologies and have No Comments

Unobtrusive JavaScript and a Session-less shopping cart

What is the idea behind unobtrusive JavaScript? What makes JavaScript unobtrusive? Does it mean removing any onlclick events in your markup and handling those click events with an approach as provided with jQuery? With jQuery its very (extremely) easy to traverse between DOM elements and its even easier associating events to elements and executing them.

I havent been doing a lot of JavaScript recently but you cannot really avoid it, but you can also not build an entire website with JavaScript and HTTPRequests alone (not search engine friendly), but you can also not rely entirely on server side code to do all the magic for you.

The other issue that has been bugging me of late is the idea of creating a session-less shopping basket, a shopping basket that uses a combination of web services and traditional classes. Within the .NET environment the only reason you might need to use sessions is to store DataTables or DataSets, but the question is how expensive is that on server resources. Would I be able to create the same session-based application with web services and traditional classes? After all you are adding web references to your web applications, and those web references all contain class declarations.

  • Share/Bookmark
posted by fr3dr1k in AJAX,ASP.NET and have No Comments

Thoughts on PHP

WordPress runs on PHP, and PHP runs on Apache, this blog uses PHP and Apache to serve up content, and .NET doesn’t. So whats the point then? Well, for all intents and purposes I have a technology that can be used to develop and maintain large commercial websites without having to change to a .NET hosting provider. The point being that while I love .NET I cannot really develop commercially websites with it unless I pay for extra hosting and in these lean economic times I cannot see myself paying more money for hosting. That means that I have to rely on technologies such as PHP.

I have been reluctant to use PHP simply because the software tools available cost money, such as Zend Studio, but I did find PHP Development Tools as part of Eclipse and today I started doing some basic PHP stuff, and its amazing to see how easy it is to adapt to PHP if you have used C#. The syntax is very similar. One of the biggest differences between PHP and .NET is the way pages are handled. .NET uses postbacks, and all the .NET code is compiled, not interpreted. PHP on the other hand interprets its code and the way it basically works is that Apache passes a request over to PHP if it detects any PHP. The PHP interpreter then executes the PHP. As far as syntax goes PHP is similar to most programming languages. Features such as assignment operators and conditional statements are similar.

  • Share/Bookmark
Tags:
posted by fr3dr1k in Web Development,Web Technologies and have No Comments

Microsoft and Facebook

Microsoft own a share of Facebook, and whats interesting to note is that there is a Facebook Developer Toolkit available for the Express editions of C#, VB and Web Developer. Facebook is a truly open platform and framework. Is Facebook dead? Or will it continue growing? Who knows.

  • Share/Bookmark
posted by fr3dr1k in Facebook,Web Technologies and have No Comments

Demystifying some .NET Issues

What seemed a little odd to me today was that SQL Server Express 2005 is download-able from two places. Both shows different file sizes.

Another issues that needs clarity is ASP.NET and .NET framework versions. .NET 3.5 is an ‘extension’ of .NET 2.0 and replaces .NET 3.0. .NET 3.5 covers AJAX (Asynchronous JavaScript and XML) and LINQ (Language Integrated Query)

  • Share/Bookmark
Tags: ,
posted by fr3dr1k in AJAX,ASP.NET,Web Technologies and have No Comments

jQuery and Microsoft

I susbscribe to The Code Project’s newsletter and today I got some great news, jQuery will be supported in Visual Studio 2008. Now this is some awesome news. Makes one wonder if the Microsoft AJAX library will become redundant.

You can read the full article on Scott Gu’s website.

  • Share/Bookmark
posted by fr3dr1k in AJAX,ASP.NET,Web 2.0,Web Development and have No Comments

Chrome fades as users return to IE, Firefox

So Google released their own browser, Chrome about three weeks ago. As with many things in life if something is interesting and new everybody is likely to have a try, or look at it, but as soon as the shine wears off they will go back to their old habits. The same sentiment holds true for Google Chrome, which after its release had about 1% browser share, but now seems to be steadily losing ground and giving share back to Internet Explorer and Firefox. Does this mean that Google will stop the development of Chrome? Will they continue developing it? Was it a flop by Google to build a browser? Only time will tell.

You can read more about this in Computer Weekly’s article.

  • Share/Bookmark
posted by fr3dr1k in Browsers,Firefox,Internet Explorer and have No Comments

Re-usable code for a Gridview and DropdownList

Both the GridView and DropdownList server controls provided in ASP.NET have DataSource and DataBind methods. This means that you could write the same code to populate both controls with data from a database. So first you would create a method for a class like this:

public DataTable GetData()
{
string strSQL = "select * from tblTest";
using(SqlConnection myConn = new SqlConnection(ConfigurationManager.ConnectionStrings["MyDB"].ToString()))
{
    using(SqlCommand myCmd = new SqlCommand(strSQL, myConn))
    {
           myConn.Open();
           using(SqlDataReader myReader = myCmd.ExecuteReader())
           {
                 DataTable myTable = new DataTable();
                 myTable.Load(myTable);
                 myConn.Close();
                 return myTable;
           }
    }
}
}

And then in the codebehind for the page that contains the GridView or DropDownList controls you create a new instance of the class you created above and set the DataSource property for the control. So if you created a class called myClass your code for the Gridview would look like this:

        myTestClass myClass = new myTestClass();
        gvMyGrid.DataSource = myClass.GetData();
        gvMyGrid.DataBind();

The only difference for the DropDownList would be setting the DataTextField and the DataValueField.

  • Share/Bookmark
posted by fr3dr1k in ASP.NET,C#,Web Development,Web Technologies and have No Comments

Do’s and don’ts for managing IT projects with wikis

Ok so here is the thing right, I have been using one or more Wiki’s as a modelling tool for my projects without anyone ever telling me to use it in that way, so amazingly I found an article that gives you the do’s and don’ts of using a Wiki within an IT project environment. I agree 100% that a Wiki is of no use if articles are not kept up-to-date. Updating and maintaining a Wiki is a conscious, disciplined effort. Don’t think that by creating some content on it once you don’t have to look at it again. The main gain from a Wiki comes from going back into articles and updating them and maintaining them. By consciously updating and maintaining your wiki you not only document processes and projects but you also allow yourself to be brutally honest at all times. There are times when I read something and I think to myself whether what I wrote there makes sense or not, or maybe it is just not relevant anymore.

At the moment I use two wiki’s, a php/open source one and an open source ASP.NET version:

  • Share/Bookmark
posted by fr3dr1k in Web 2.0,Web Technologies and have No Comments
Get Adobe Flash playerPlugin by wpburn.com wordpress themes