Prototype.js Template to C# 3.0

Have you ever seen such syntax in JavaScript:

If you worked with great library Prototype.js surely yes. Such functionality implemented in class Template, which has just one method - evaluate. It does replacement in string template using input data object.

Now comes the tasty thing. How do you thing is it possible in C# 3.0? Of course yes! Let’s write the test (I expect you’ve heard about TDD):

Now we should implement Template class. Use a little bit reflection and we got prototype.js Template on C# 3.0.

Be happy of using it :)

In russian

Baseline grid - CSS typography

Yesterday I finished book
CSS Cookbook, Second Edition

Interesting book, recommend. To be more concrete, it was interesting to learn about text sizing technique. Read about 62.5 technique, widely used in css world.

Url rewriting in .NET (clean url's)

Clean url's have big advantages. You can read in google about clean url's and url rewriting.

Example:
http://www.ajaxline.com/common-ajax
http://www.ajaxline.com/index.php?pid=12&something=24

Not hard to see that first url is self explained. Easy to memorize and more interesting for search bots.

In this post I'm not going to make Url rewriting overview. I just tell about my experience with 2 tools. I used them on Windows Server 2003 and IIS6.

Open source blog engine for .NET

Found very interesting project

http://www.dotnetblogengine.net/

It's free Blog engine with big number of interesting features.
Technorati Profile

PHP to .NET

My friend show my interesting link today to interesting project. Phalanger compoles PHP apps to MSIL and PHP application becomes faster in 2 times!

This is common description:

Phalanger overview

Phalanger is a new PHP implementation introducing the PHP language into the family of compiled .NET languages. It provides PHP applications an execution environment that is fast and extremely compatible with the vast array of existing PHP code. Phalanger gives web-application developers the ability to benefit from both the ease-of-use and effectiveness of the PHP language and the power and richness of the .NET platform taking profit from the best from both sides.

Cross platform library for MS Office

We are going to create cross platform library for MS Office so you can work with MS Office documents without installed Office.
For now we need first feedback if it makes sense for you.

Thanks Igor

Discuss this also on forum http://www.forums.ajaxline.com/?topic=29.msg59;topicseen#new

ASP.NET AJAX thoughts

Then more I work with it then more I understand that with your hand made javascript you get  User Friendlier interface. 

For example you have one outer UpdatePanel, inside it you have 15 inner panels. You want to refresh content of each panel independatly and what you get? - you get very very slow work of MS JS  especially in IE6!!!.

I wrote letter to Scott Gu about this issue and get very funny and helpful answer:

Asp.Net Response.BinaryWrite problem with SSL - How to fix

In some cases with SSL you can get error when download form browser stream file. This code works with SSL.

    public static void WriteExcelFileToResponse(HttpResponse Response, byte[] fileContent, string fileName)
        {
            SetExcelHeaders(Response, fileName);
            Response.BinaryWrite(fileContent);
            Response.End();
        }
    public static void SetExcelHeaders(HttpResponse Response, string fileName)

IIS http to https redirect. SSL issue.

I setuped ssl on my site and I needed to create redirection from http to https. I solved this in such way.

1. Created file httpsRedirect.htm
with such content

   <script type="text/javascript">

Internet Explorer Developer Toolbar Beta 3

I don't know if you use something for IE to explore your DOM. But you should look to good tool for IE -Internet Explorer Developer Toolbar (very close for firebug(firefox) in functional but less in features)

 

Overview


The Internet Explorer Developer Toolbar provides several features for exploring and understanding Web pages. These features enable you to:

Digg Celebrates 2nd Birthday

Hard to believe, but two years ago today. Owen Byrne, wrote a post on the Digg blog today:

Hard to believe, but two years ago today, Kevin decided my code was bug- free enough to take down the beta sign and unleash Digg upon the world. It???"?s been a crazy and exciting time since then, and we owe it all to you - the loyal and passionate members of the Digg community.

To those of you who have spent countless hours finding the coolest and timeliest content on the Internet, I and the entire Digg team would like to personally thank you for your contributions and loyalty.

Some trivia ?????

* First story to hit the home page after officially releasing: http://digg.com/tech_news/Google_Cheat_Sheet

* # of users who registered in the first week: 578

JavaScript editors - overview

Ajax programmers write a lot of js code every day. To make this action more comfortable there should be some good JavaScript editor.

All my Ajax applications I have done in VS2005(almost of them is asp.net) I didn't have the time to find something better for JavaScript.

So lets start overview from

VS2005(and Visual Web Developer)

pluses:

+ syntax highlighting

+.NET integration

+ html,css editor in one place

minuses

-little code assist for common JavaScript function and objects

-usual text editor

Link

I don't recommend to use it, because there is you can find much better tools.

One of them

Intelli JIdea

My new books

Yesterday I spent some money and some time to by this great books:

 

Refactoring to Patterns (The Addison-Wesley Signature Series) (Hardcover)
by Joshua Kerievsky
This is my favorite serie of Martin Fawler
Beginning SQL Server 2000 Programming (Paperback)
by Robin Dewson
I'd like to improve my MS SQL knowledge

How to save several hours on setup JBOSS+EJB3

Hi my dear friends

I want to describe you how to setup JBOSS+EJB3 to prevent such evil error during deployment

status: Deployment FAILED reason: ejb-jar.xml must either obey the right xml schema or define a valid DOCTYPE!

First you have to download this version of JBOSS(because this version doesn't have bugs)

http://heanet.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.4RC1-installer.jar??

This is very simple and very helpful. Don't forget to set JAVA_HOME variable in run.bat(for windows something like this set JAVA_HOME=c:\progra~1\Java\jdk1.6.0)??

Wow free space!
Super hosting provider might be here!

Is it Google?