DCSIMG
Sharing My Source - Asaf Shelly

Sharing My Source

Published Tuesday, April 21, 2009 4:24 PM

Hi all,

As some of you may know I have a huge collection of applications and code samples. I don't have a degree so all my studies were by designing and writing tools and projects. It was clear to me for some while that I should publish this code. I even tried to do this once before but it is not so simple. The code looks bad when it is viewed as a simple text file over the web. Coloring is problematic because you need to deal with it over and over again whenever you have a bug fixed.

Bottom line is that I decided to finally do it. It took me less than 12 hour of work to produce a text parser that produces HTML files for c/++/# files. It is only appropriate (and simple :) to share the source code of this generator as the first project that I share.

http://asyncop.com/Link.aspx?Open-Source

I will eventually find the time to produce some management system so I can add new projects without too much trouble.

The project publisher tool has three basic elements:

A C# library with ProjectPublisher.cs which is the engine, a C# WebService that uses the library with the source file ProjectPublisherWSvc.asmx.cs, and a simple web page demonstrating the use of the WebService called Default use of ProjectPublisherWS.aspx.cs.

The source files are parsed on demand so the original file on the server is the clean source file. This way I can update the sample by copying the new C\++\# file using the FTP folder. I am assuming that there won't be more than one request per second and if there is then I can always turn on the cache on the firewall.

The WebService is open to the public so you can simply send a string read from a source file and the server will return an HTML file. The reserved words are in arrays and the color tagging are members to a class. It should be easy to add API that receives the list of reserved words and color schemes.

WebService URL is: http://services.asyncop.com/ProjectPublisher/ProjectPublisherWSvc.asmx

Let me know if you find any bugs. This is still only 12 hours of work for coding, designing, debugging, testing, and integration with the AsyncOp website...

Regards,

Asaf

Comments

# DenzelWo said on Monday, November 02, 2009 6:20 PM

Hola everybody, HAPPY HALOWEEN! A little late..!

# Asaf Shelly said on Sunday, December 20, 2009 10:06 AM

Hi All, As you can see I have upgraded the shared-source engine (see my previous post http://blogs.microsoft

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: