Friday, December 26, 2008

How to Use .NET 3.5 Features and C# 3.0 Syntax in .NET 2.0?

It is possible to benefit from some of the .NET 3.5 features and new syntactic sugar in C# 3.0, while still targeting customers that have only .NET 2.0 Framework. That's because these two versions share the same .NET CLR and mainly differ in the set of libraries available and compiler being used.

Features that you can leverage, while targeting .NET 2.0 Framework:
local variable inference;
anonymous types;
object initializers;
extension methods;
query expressions (LINQ syntax);
lambda expressions;
LINQ for objects;
new C# compiler that produces better code.

I've done this for production scenarios with ASP.NET Forms and Windows.Forms and everything has been working fine. It is possible that things like WCF or Linq2DB might also be supported, but I've never given it a try.

Below you will find different options for doing this in your solutions.

Note, that in any scenario you still need Visual Studio 2008 to develop these solutions.

Referencing LinqBridge

1. Create new project targeting .NET 2.0 Framework in Visual Studio 2008. This will already give you new syntax capabilities of C# 3.0

2. Download LinqBridge

3. Reference it in the project to get support for the extension methods and LINQ extensions.

Read More...

Tuesday, December 23, 2008

Visual Studio 2008 simplifies JavaScript debugging

With Visual Studio 2008 installed, there is one additional requirement for enabling JavaScript debugging: Internet Explorer must have script debugging enabled. This setting is available via the Tools | Internet Options menu within Internet Explorer. Once the Internet Options dialog box is open, select the Advanced tab and the Disable Script Debugging option is located in the Browsing section. It should not be checked so that it is enabled.

Features

The JavaScript debugger presents many standard debugging features. The following list provides a review of some of these features.

* Breakpoints: Breakpoints allow you to stop code execution at specific points within the source code. JavaScript breakpoints work just like C#/VB breakpoints.
Breakpoints are set/cleared by clicking to the left of the code within the IDE; by using the Debug menu or by using the Breakpoint Context menu available by right-clicking on the code. In addition, you may create conditional breakpoints to allow you to define conditions for the breakpoint, as well as set up a macro to run or a message to print when the breakpoint is triggered. Breakpoints are viewable in the Watch window located by default in the lower left of Visual Studio 2008.
* Call Stack: The Call Stack tab in the lower right of Visual Studio 2008 allows you to view what is being called when the ASP.NET page is loaded/running.
* Locals: The Locals tab in the lower left of Visual Studio 2008 allows you to view the values of variables and objects during script execution. Also, you may change the contents of one of the local variables while the page is running.
* Execute code: The Immediate Window tab in the lower right of Visual Studio 2008 allows you to execute JavaScript code on-the-fly during page execution.

Read More...

Monday, December 22, 2008

Google Introduces Advertisement in its Suggest Feature

In order to improve online advertising revenue Google Suggest, the search engine's tool that is able to list the most likely user searches through a drop-down menu only given the first characters of a query, is now featuring sponsored links among its suggestions.

The ads are currently visible to a fraction of the search engine users but, when present, are displayed at the top of the suggestion list; with a blue link at the top, green URL and an additional description, their layout closely resembles that of Google AdSense. The part of the user query that matches a sponsored link title is instantaneously rendered in bold, much link in normal search results.

As many have noted, though, the ad positioning may be less than ideal for advertisers, since there is a good chance that users could inadvertly click on the sponsored link and therefore generate many false positives — a gain for Google, but a clear loss for the advertiser, which already have to cope with a percentage of false positives that Google itself estimates at around 11 percent.

In its AdSense policy, the Google team is very clear in setting up strict guidelines for webmasters so that their sites can generate qualified visitors for the growing base of advertisers using their platform. Among other things, limits are set on the number of banners to be featured in each webpage as well as on the site content.

Read More..

Ruby on Rails 10 Tips

1. Use ActiveResource and avoid ActiveWebService. With ActiveResource and multiview support in Rails 2.x you can easily expose RESTful models as well as Atom/RSS feeds on these models as well as JSON and any other view format you can wish for.

2. Consuming ActiveResource is easy by using self.site = "URL" in the client side. However, that does not add data to the DB and every query will result in a REST call. Caching data is key.

3. Use Rake to automate any other tasks you do. Custom Rake tasks are easily added in lib/tasks. Use $rake -T to see current tasks available, including yours.

4. Use database migrations to update models once your design is solid and you have a first release and cannot avoid data losses. That is, to be clear, use one migration per model early on and then once app is released for beta, every change to the models should be via new migration (not an update to the old migration). This will save lots of headaches in future and allow you to easily move application from one version to next one.

5. Use Solr vs. Ferret for models searchability and associated acts_as_xyz plugins. This is due to the fact that Ferret indexes tend to get corrupted. This, in some sense, is a shame since Ferret is a nice and easy plugin.

6. Make sure to use Rails validations in your models. I would avoid special DB statements in migration code. This makes it easier to move to different DB, e.g., MySQL to DB2.

7. Use view partials to keep your views DRY. Essentially, partials should be any view code that is repeated, similar to a subroutine call (PullUp or PushDown method refactoring). Use a app/views/shared directory for partials that are across controllers. Also, always use the controller (or shared) name when calling the partial.

Read More..

Gradual Value Addition in Website Development

Advance versions of programming languages & frameworks are adding value to website development! Website development is gaining because of regular updates in technologies due to increasing demands of online business for most unique presentations and easy functionality.

Website development using ASP.NET framework is well known in the web development and its introduction after ASP has shown regular development phases. All over the world developers are enjoying its latest versions at regular intervals of time. ASP.NET is popular web application framework of Microsoft, since its inception in year 2002 with version 1.0; developers are using this exclusive technology to develop web applications as well as websites and various web services.

Every new feature in update version produces effective changes in website look as well functionality that helps ultimate user for better presentation of product and services online. Ultimately progressions in technologies also help in online business development such as professional developers use to get new avenues for earning more by providing fresh & easy to use websites to their clients.

So far ASP.NET has introduced its five updated versions with new added features in each version.

* It was first commenced to web world with version 1.0 in 2002 with Visual Studio .NET,
* In 2003 version 1.1 with Windows Server 2003 and Visual Studio .NET 2003,
* In 2005 version 2.0 with Visual Studio 2005, Visual Web Developer Express and SQL Server 2005,
* In 2007 version 3.5 released with Windows Server 2008 and Visual Studio 2008,
* In 2008 version 3.5 service pack released with Visual Studio 2008 Service Pack 1

ASP.NET allows developers for web application development to use fully featured languages like VB.NET and C# (C-Sharp). Feature of “web services” is unique by ASP.NET, class library, XML support and complete compatibility with other programming languages.

Read More..

Top 10 .NET News Stories of 2008

It’s that time of the year to reflect, analyze and compile our lives into a series of Top 10 lists. As with every other Top 10 list, the items on this list and their order are highly subjective. For example, some companies may not care about future versions of .NET — version 2.0 works just fine, thank you. Other companies may need to develop a web application, so Silverlight 2.0 is their top story of the year. So please comment below with your Top 10 List.

Following are the Top 10 stories in 2008 about software development with the Microsoft .NET Framework:

1. Visual Studio 2010 and .NET Framework 4.0 Announced

The biggest .NET buzz of 2008 came from the announcement of the next generation of the .NET Framework, C#, Visual Basic and Visual Studio, all to be released in 2009. New features include modeling tools integrated into the Visual Studio IDE, support for UML and Domain Specific Languages, improved testing tools, substantial improvements in collaboration capabilities, ability to link work items with code and models, and workflow-based builds. There are also significant improvements in C# 4.0 including co-variance and contra-variance, named and optional parameters, dynamic variables and programming features, and improved COM Interoperability.

2. Global Economic Recession

This news story will likely appear in most Top 10 News lists for 2008. The global economic recession touches just about everything in our lives. For software developers and most workers, this deep and lengthy recession may result in company closings, layoffs, stagnant or reduced salaries, reduced company spending on equipment and developer training, and a significant drop in venture capital. This means more stress on developers and software entrepreneurs. And perhaps more opportunity for innovation.

3. .NET Framework Source Code Available

Microsoft released the source code for the .NET Framework under its Reference License. This makes it much easier to debug .NET framework issues since you can dive down into the .NET code. The “read-only” license enables developers to inspect the source code for reference and debugging, but not modify or distribute the code.

4. Visual Studio 2008 and .NET 3.5 Service Pack 1 Released

Microsoft released Service Pack 1 for Visual Studio 2008 and .NET 3.5. This update patched numerous bugs, improved performance, and even added a few new features. One of the best new features was a new .NET Framework installation optimized for client applications. The optimized download is less than 28 MB, compared to the original 200 MB download.

5. ASP.NET MVC Framework Introduced

MVC is a design methodology that divides an application’s implementation into three component roles: models, views, and controllers. ASP.NET MVC enables developers to build Model View Controller (MVC) applications with the ASP.NET framework and is an alternative, not a replacement, for ASP.NET Web Forms. ASP.NET MVC offers the following benefits: clear separation of concerns, support for Test-Driven Development (TDD), fine-grained control over HTML and JavaScript, and intuitive URLs. ASP.NET MVC is in the public preview stage and will be released to production next year.

Read More..

Thursday, December 18, 2008

Web 2.0 Marketing is Simpler than You Think

Experts say that a down economy is the best time to invest in marketing. At the same time you may be looking at your budget and wondering where the additional money will come to increase your marketing spend and what investments will drive the most revenue and profit for your company. Good news, all you need to know is a little about Web 2.0.

Marketing has grown beyond television, billboards and print. New Web applications are introduced almost daily. Each application allows your customers to interface with you and your business in a less-expensive, more productive manner.

Here are some quick ways to work Web 2.0 into your marketing plan:

Review your Web site
Look to increase ways for your customers to talk with you. Offer live chat options increasing your technical support or support desk offerings. ZaZa Chat and Volusion both offer easy to use interfaces for your customers and your business. Allowing your customers to talk with your representative in both the consideration and purchasing stages can extend the reach of your staff and offer the availability your customer is seeking. If you are ready to expand your service offerings, this is a great option for technical or help desk support, allowing you to offer more with less investment.

Measure Marketing Success
If you have a Web site, you must measure your site’s effectiveness and how your customers interact with you. If not, you’re missing out on importance of Web marketing. Google, Yahoo and Microsoft offer business solutions to increase your SEO (search engine optimization) and SEM (search engine marketing). Online marketing allows for greater measurability of your campaigns and promotions. Investing in a company that focuses on SEO and SEM can increase your marketing campaigns and drive both customer retention and incremental new business.

Start Talking More

There’s no end to the number of communication applications. Social networks like Facebook are adding more than 100,000 new users a week. Your customers are already there. Not sure how to use Facebook, LinkedIn or Twitter? Consult with a social media marketing specialist. A good writer can assist you with your profiles, blogs and community interactions. It’s worth the expense to have a dedicated resource to keeping your information updated as the online marketing can go stale in a week.

Invest in Databases
I love Excel spreadsheets, but they cannot do what today’s customer relation management (CRM) systems can do. You can track everything about your customer from conversations to purchases to campaign responses. It’s a fact worth repeating: it costs five times more to get a new customer than it does to grow business with your existing customers. Keeping your customer information up to date will improve your customer satisfaction rates and prevent costly sales errors. Are you growing your services business? CRM databases are a must. Allowing your staff from marketing, sales and operations to view the activities, purchasing habits and renewal dates is crucial to growing revenues and profits.

Read More..