Nov 29

DateJS, OpenSource JavaScript Date LibraryDatejs is an open-source JavaScript Date Library.

Comprehensive, yet simple, stealthy and fast. Datejs has passed all trials and is ready to strike. Datejs doesn’t just parse strings, it slices them cleanly in two.

These are the About words on the homepage, yet a lot more need to be said. DateJS is a small tool which is easily installed and configured. Moreover he has those small features we need sometime and have to code each time in different projects. Now you can easily start typing like “today” and volia - you will get today’s date.

Nov 27

This afternoon from Microsoft released an updated version of the Silverlight 1.1 Tools Alpha that works with the final release of Visual Studio 2008. You can download it for free here.

The tools alpha refresh released today has the same feature-set as the Silverlight Tools Alpha add-on which was previously available for Visual Studio 2008 Beta2 (it has simply been updated to work with the final VS 2008 release). This feature-set includes basic Silverlight 1.1 project system support, XAML markup editing and intellisense support, debugging support, Expression Blend project compatibility, and VB and C# code-behind intellisense. You can find quickstart tutorials that detail how to use these features here.

The next public preview of Silverlight will include a ton of new runtime features, as well as a significantly enhanced VS 2008 tooling support. Scott Guthrie will be blogging more details about this shortly.

Nov 20

Yesterday I came across this library written by Greg Houston. Its called Mocha UI and its a MooTools user interface class made with canvas tag graphics. This is an on going exercise to help Greg become more familiar with both MooTools and the canvas tag. After playing for a while with it I have noticed that Greg has done great job! His library is just 15kb(uncompressed) and I personally find it quite useful!

Features

* No images. The windows, including their controls, gradients and shadows, are drawn with the canvas tag.
* Adjustable rounded corner radius.
* Windows can be focused, dragged, resized, maximized, restored down and closed.
* Dynamically create new windows on demand.
* Fullwindow window size is adjusted if the browser window size changes.
* Minimal HTML markup required.
* Tested in Firefox 2, Internet Explorer 6 & 7, Safari 2, and Opera 9.

View demo here

Nov 19

Today Microsoft shipped Visual Studio 2008 and .NET 3.5. You can download the final release using one of the links below:

* If you are a MSDN subscriber, you can download your copy from the MSDN subscription site (note: some of the builds are just finishing being uploaded now - so check back later during the day if you don’t see it yet).

* If you are a non-MSDN subscriber, you can download a 90-day free trial edition of Visual Studio 2008 Team Suite here. A 90-day trial edition of Visual Studio 2008 Professional (which will be a slightly smaller download) will be available next week. A 90-day free trial edition of Team Foundation Server can also be downloaded here.

*If you want to use the free Visual Studio 2008 Express editions (which are much smaller and totally free), you can download them here.

* If you want to just install the .NET Framework 3.5 runtime, you can download it here.

List of New Features - old version

- VS 2008 Multi-Targeting Support
VS 2008 enables you to build applications that target multiple versions of the .NET Framework. This means you can use VS 2008 to open, edit and build existing .NET 2.0 and ASP.NET 2.0 applications (including ASP.NET 2.0 applications using ASP.NET AJAX 1.0), and continue to deploy these application on .NET 2.0 machines.

- ASP.NET AJAX and JavaScript Support
.NET 3.5 has ASP.NET AJAX built-in (no separate download required). In addition to including all of the features in ASP.NET AJAX 1.0, ASP.NET 3.5 also now includes richer support for UpdatePanels integrating with WebParts, ASP.NET AJAX integration with controls like and , WCF support for JSON, and many other AJAX improvements.

- VS 2008 Web Designer and CSS Support
VS 2008 and Visual Web Developer 2008 Express includes a significantly improved HTML web designer (the same one that ships with Expression Web). This delivers support for split-view editing, nested master pages, and great CSS integration.

- Language Improvements and LINQ
The new VB and C# compilers in VS 2008 deliver significant improvements to the languages. Both add functional programming concepts that enable you to write cleaner, terser, and more expressive code. These features also enable a new programming model we call LINQ (language integrated query) that makes querying and working with data a first-class programming concept with .NET.

- Data Access Improvements with LINQ to SQL
LINQ to SQL is a built-in OR/M (object relational mapper) in .NET 3.5. It enables you to model relational databases using a .NET object model. You can then query the database using LINQ, as well as update/insert/delete data from it. LINQ to SQL fully supports transactions, views, and stored procedures. It also provides an easy way to integrate business logic and validation rules into your data model.

- Browsing the .NET Framework Library Source using Visual Studio

Lots of other improvements

The list above is only a small set of the improvements coming. For client development VS 2008 includes WPF designer and project support. ClickOnce and WPF XBAPs now work with FireFox. WinForms and WPF projects can also now use the ASP.NET Application Services (Membership, Roles, Profile) for roaming user data.

Office development is much richer - including support for integrating with the Office 2007 ribbon, and with Outlook. Visual Studio Tools for Office support is also now built-into Visual Studio (you no longer need to buy a separate product).

New WCF and Workflow projects and designers are now included in VS 2008. Unit testing support is now much faster and included in VS Professional (and no longer just VSTS). Continuous Integration support is now built-in with TFS. AJAX web testing (unit and load) is now supported in the VS Test SKU. And there is much, much more…

Installation Suggestions

People often ask me for suggestions on how best to upgrade from previous betas of Visual Studio 2008. In general I’d recommend uninstalling the Beta2 bits explicitly. As part of this you should uninstall Visual Studio 2008 Beta2, .NET Framework Beta2, as well as the Visual Studio Web Authoring Component (these are all separate installs and need to be uninstalled separately). I then usually recommend rebooting the machine after uninstalling just to make sure everything is clean before you kick off the new install. You can then install the final release of VS 2008 and .NET 3.5 on the machine.

Once installed, I usually recommend explicitly running the Tools->Import and Export Settings menu option, choosing the “Reset Settings” option, and then re-pick your preferred profile. This helps ensure that older settings from the Beta2 release are no longer around (and sometimes seems to help with performance).

Note that VS 2008 runs side-by-side with VS 2005 - so it is totally fine to have both on the same machine (you will not have any problems with them on the same box).

Silverlight Tools and VS Web Deployment Project Add-Ins

Two popular add-ins to Visual Studio are not yet available to download for the final VS 2008 release. These are the Silverlight 1.1 Tools Alpha for Visual Studio and the Web Deployment Project add-in for Visual Studio. Our hope is to post updates to both of them to work with the final VS 2008 release in the next two weeks. If you are doing Silverlight 1.1 development using VS 2008 Beta2 you’ll want to stick with with VS 2008 Beta2 until this updated Silverlight Tools Add-In is available.

Read Scott Gu

Nov 18

Brad Abrams describes how to create RSS feed with the new ASP.NET MVC Framework. Lately it has been popular to post about the new ASP.NET MVC framework. Here is part of his post:
In this example, I am going to walk through building an RSS feed from data in a relational database.. My goal here is to give you and idea of what is possible with the MVC support that is coming out as a CTP soon for ASP.NET…

There is some good stuff here, that really shows you how to get going… but for what we are going to do, we don’t really need it… so go ahead and clear out all the directories and files under Views, Models and Controllers… we will build this from scratch.

Creating the Model

Because I had an existing database, I chose to start with it… I added my VideoDatabase.mdf file from another project I worked on recently.. of course any database would work. Then I created a Linq model and called it “VideoDatabase.dbml”… Notice of course EntityFramework would work really well here as well…

Check out the whole post here

Nov 18

Matt Berseth has this post about jQuery TabContainer. Its pretty usefull as he describes how to add animations to that control.

Check it out here

Nov 18

Apple’s site can tell you a lot about the new end-user features of Safari 3. But a lot of the goodness is on the inside, in the WebKit engine that powers Safari. Here’s a list of ten of the most exciting engine enhancements since the Safari 2 version of WebKit, with lots of details and demos. These features are all included in the WebKit that comes with Safari 3 - you don’t have to download nightlies or anything else to get them.

1. Enhanced Rich Text Editing
2. Faster JavaScript and DOM
3. Faster Page Loading
4. SVG
5. XPath
6. New and Improved XML Technologies
7. Styleable Form Controls
8. Advanced CSS Styling
9. Reduced Memory Use
10. Web Developer Tools

One of the best WebKit improvements is the availability of Web Developer tools, the Web Inspector and the Drosera JavaScript debugger. I can’t really describe these better than the original blog posts, so here’s some screenshots and links to the original posts:

read source

Nov 17

Today I came across this blog article by Fredrik Normen in which he describes how to list and save data in new MVC Framework.

Here is his part of his post:

When building application today (X)HTML-based web interfaced is often used as the front-end choice today. Several companies used Microsoft SharePoint or other web-based portals solutions as intranet; we have several public applications which are web based. Enterprise applications continue to adopt web-based user interfaces, and this will unlikely change in the near future. A web-based user interface can today target almost any platform, and the deployment of web-based application is much easier than a desktop application that needs to be installed on every client. It’s easier to brand a web application than a desktop application like a Windows Form. A web based application will not take up to much resource on the client’s computer. But there are some challenges also.

The Request-Response paradigm can complicate interactions that would be simple in traditional UI. For example if we have a Windows application we can simply hold the state, HTTP is a stateless protocol which will complicate state management. A web applications user interface today can also be complex, often produced by tools like DreamWeaver and “probably” FrontPage ;) The applications also often use client-side JavaScript. Some content can be hard to be edited by a .Net developer. But for a designer and of course some developers it’s easy to change the user interface, and often a web applications user interface will be changed. This requires a clean separation of presentation from business logic.
With the ASP.Net MVC Framework we will have separation of concerns. We separate the presentation from the business logic. The MVC is an abbreviation of Model View Controller, where the Controller objects accept user input and invoke business logic to create and update model objects. The Model object has the responsibility to provide the data to display; the model is a contract between controller and view. The View objects are responsible to display the Model, as provided by the controller that invokes it. By using the ASP.Net MVC Framework we will have more control over the HTML (a cleaner HTML page), we will have a controller separated from the View. By having this separation developers can create controllers and use unit-testing or TDD without knowing anything about how the model should be presented. The designer of the User Interface doesn’t need to know about the controller, only what data that should be displayed and sent back during a POST. The three parts in the MVC pattern, the View, Controller and Model can be implemented by three different developers and designer at the same. TDD can be applied when creating the Controllers and also the Model, this because of the separations and the possibility to create mock objects. The MVC Framework works against interface so we have interfaces for everything so we can easy create our mocks and test our controllers without needing to know about the View. We can also mock the Model.

read original

Nov 14

Another nice feature from the HTML5 draft specification is now available in the WebKit nightly builds for Mac OS X. The new HTML5

<video src=sample.mov autoplay></video>

To make a button that gives the user basic playback controls you could do this:

<script>
function playPause() {
  var myVideo = document.getElementsByTagName('video')[0];
  if (myVideo.paused)
    myVideo.play();
  else
    myVideo.pause();
}
</script>
<input type=button onclick="playPause()" value="Play/Pause">

The specification also defines a set of events that can be used to react to changes in media playback and load state. For example:

myVideo.addEventListener('ended', function () {
  alert('video playback finished')
} );

To play audio from JavaScript you can simply do this:

var audio = new Audio("song.mp3");
audio.play();

The implementation is still a work in progress and not all features (including the ‘controls’ attribute which gives native playback controls) of the specification are there yet. The current implementation supports all formats that QuickTime supports, including installed 3rd party codecs.

The example below uses the ‘poster’ attribute of the

Opera’s implementation is similar, including informative text when the media is not available:

<video controls src="demo.ogg" id="myVideo">Theora decoder not found</video>
Nov 13

Today Scott Guthrie released first post from a series of post describing the new .NET model - MVC(Model View Controller).
It provides a structured model that enforces a clear separation of concerns within applications, and makes it easier to unit test your code and support a TDD workflow. It also helps provide more control over the URLs you publish in your applications, and can optionally provide more control over the HTML that is emitted from them.

In his post he shows how easily a simple E-Commerce application is build. The sample project is availabe in the new Visual Studio 2008 Project Templates.

Great plus for developers is that when created the solution includes also a unit test project!

You can use any unit testing framework (including NUnit, MBUnit, MSTest, XUnit, and others) with the ASP.NET MVC Framework. VS 2008 Professional now includes built-in testing project support for MSTest (previously in VS 2005 this required a Visual Studio Team System SKU), and our default ASP.NET MVC project template automatically creates one of these projects when you use VS 2008.

We’ll also be shipping project template downloads for NUnit, MBUnit and other unit test frameworks as well, so if you prefer to use those instead you’ll also have an easy one click way to create your application and have a test project immediately ready to use with it.

Understanding the Folder Structure of a Project

The default directory structure of an ASP.NET MVC Application has 3 top-level directories:

* /Controllers
* /Models
* /Views

As you can probably guess, we recommend putting your Controller classes underneath the /Controllers directory, your data model classes underneath your /Models directory, and your view templates underneath your /Views directory.

While the ASP.NET MVC framework doesn’t force you to always use this structure, the default project templates use this pattern and we recommend it as an easy way to structure your application. Unless you have a good reason to use an alternative file layout, I’d recommend using this default pattern.

Mapping URLs to Controller Classes

In most web frameworks (ASP, PHP, JSP, ASP.NET WebForms, etc), incoming URLs typically map to template files stored on disk. For example, a “/Products.aspx” or “/Products.php” URL typically has an underlying Products.aspx or Products.php template file on disk that handles processing it. When a http request for a web application comes into the web server, the web framework runs code specified by the template file on disk, and this code then owns handling the processing of the request. Often this code uses the HTML markup within the Products.aspx or Products.php file to help with generating the response sent back to the client.

MVC frameworks typically map URLs to server code in a different way. Instead of mapping URLs to template files on disk, they instead map URLs directly to classes. These classes are called “Controllers” and they own processing incoming requests, handling user input and interactions, and executing appropriate application and data logic based on them. A Controller class will then typically call a separate “View” component that owns generating the actual HTML output for the request.

Also here are his conclusion words:
Summary

This first blog post is a pretty long one, but hopefully helps provide a reasonably broad look at how all the different components of the new ASP.NET MVC Framework fit together, and how you can build a common real world scenario with it. The first public preview of the ASP.NET MVC bits will be available in a few weeks, and you’ll be able to use them to do all of the steps I outlined above.

While many of the concepts inherent to MVC (in particular the idea of separation of concerns) are probably new to a lot of people reading this, hopefully this blog post has also show how the ASP.NET MVC implementation we’ve been working on fits pretty cleanly into the existing ASP.NET, .NET, and Visual Studio feature-set. You can use .ASPX, .ASCX and .MASTER files and ASP.NET AJAX to create your ASP.NET MVC Views. Non-UI features in ASP.NET today like Forms Authentication, Windows Authentication, Membership, Roles, Url Authorization, Caching, Session State, Profiles, Health Monitoring, Configuration, Compilation, Localization, and HttpModules/HttpHandlers all fully support the MVC model.

If you don’t like the MVC model or don’t find it natural to your style of development, you definitely don’t have to use it. It is a totally optional offering - and does not replace the existing WebForms Page Controller model. Both WebForms and MVC will be fully supported and enhanced going forward. You can even build a single application and have parts of it written using WebForms and parts written using an MVC approach if you want.

Read the whole article