Spark

Spark CodeTemplates

While my solution compiles, 80 projects, I started working on ASP.NET MVC CodeTemplates for Spark View Engine. They are available in my GitHub repo. Feel free to fork and extend!

http://github.com/detroitpro/spark/tree/master/src/CodeTemplates/

Tags:

Thursday, March 18th, 2010 Spark 1 Comment

ASP.NET MVC Spark Support

ASP.NET MVC 2 supports Spark!

What? hear me out. The release of ASP.NET MVC 2 includes an amazing hidden gem. You see the “Add View/Controller” dialog now takes into account a T4 directive “output extension”.

Getting started with Custom CodeTemplates

To get started with Custom CodeTemplates check out this excellent article by K. Scott Allen

Getting started with Custom CodeTemplates and Spark

  1. At the top of your templates add the output extension as shown below.
  2. Modify the template to use spark.

image

Tags: ,

Thursday, March 11th, 2010 ASP.NET MVC, Spark No Comments

Spark View Engine 1.1

ASP.NET MVC 2 was RTM’ed today and with the help of Jay Harris@jayharris we upgraded our rather large codebase to not only ASP.NET MVC 2 RTM but also a new drop of the Spark View Engine built against the RTM.

Since the release of Spark View Engine 1.1 RC a few weeks ago there have been some minor bugs/enhancements identified but no blockers. The update to RTM was nothing more then changing the assembly reference, build number and running the build script.

These changes are not yet reflected in on the GitHub source. I’m sure there will be a pull request or Lou@loudej will update master pretty quickly.

Head over to CodePlex to download the new release and of course thanks to Lou for building an amazing tool.

Tags: ,

Thursday, March 11th, 2010 ASP.NET MVC, Spark No Comments

Spark Binaries For ASP.NET MVC RC2

THIS IS NOT AN OFFICAL RELEASE…YET

I spent the evening updating the spark source to support ASP.NET MVC RC/RC2. Well, actually I simply applied the changes that were posted to either the mailing list or codeplex.

All the tests pass:

image

Download it here:

Binaries: Spark-1.0.1.0-release.zip

Source: Spark-1.0.1.0-source.zip

This post, hopefully, won’t be up long.

Tags: ,

Tuesday, February 9th, 2010 ASP.NET MVC, Spark 4 Comments

ASP.NET MVC2 To Provide Real Spark Support

Ok, that might be going a little too far but it sounds like the barrier I wrote about a few weeks ago might be going away.

Earlier this evening Phil Haack posted this tweet:

image

Excited to hear this I asked a leading implementation question about honoring the output extension directive in T4 templates.

image

Us old-timer remember the almost year before ASP.NET MVC 1.0, when we had not tooling support inside visual studio. Right before 1.0 was released we got right-click view/controller support and it made a world of difference. I honestly believe that without the GUI integration, that pushed us to use strong-typed views, MVC would have taken longer to get into less progressive shops.

I’m really excited about MVC2 …but it still needs a logo.

image

image

Tags: ,

Thursday, January 21st, 2010 ASP.NET MVC, Spark 2 Comments

ASP.NET MVC: Not That Open Source

ASP.NET MVC has one small hook into Visual Studio, the ability to right click and add views and controllers.

image

This feature is small, hell since I’ve been using spark I almost forgot about it, that is until I started working on a simple administration section. The application has enough entities that “Right Click –> Crud” would make just the right tool.

image

Idea

ASP.NET MVC provides customizable code templates for the view/controller content. There are a few really good articles on how to get started.

Plan

  1. Include the CodeTemplates in my project
  2. Change the output extention to .spark
    1. image
  3. Modify the markup to sparkup
  4. Phase 3: Profit.

Problem

ASP.NET MVC uses a custom tool to process the T4 templates.

MvcTextTemplateHost

It ignores the output extension directive in T4 templates.

(Click play)

The Price is Right Losing Horns sound bite

Sadness

MvcTextTemplateHost is included in Microsoft.VisualStudio.Web.Extensions.dll and this DLL that is not “part” of MVC code that was open sourced.

Conclusion

I’d love to write a Visual Studio addin to create spark views but I just don’t have the time. However; I do wonder if I can just have spark parse the .aspx and .ascx files.

Tags: , ,

Monday, January 11th, 2010 ASP.NET MVC, Open Source, Spark, mvc 2 Comments

Spark with VB.NET Project Demo #2

Outline:

  • Status of using spark in a VB.NET project
  • Bugs from Spark Demo #1
  • Strongly Typed Views

Tags: , ,

Wednesday, June 3rd, 2009 ASP.NET MVC, Spark, Video No Comments

Toolset 2009

Most of my work so far this year has been with one client. This client was a Java shop for quite some time and is pretty green to Microsoft. Also, they don’t seem to ever have had real success with building enterprise class systems. That’s not to say that they haven’t wrote very large and very complex systems. They have done it all with either the bare minimum in tooling or a incorrect implementation of the tooling.

In fact; one of their primary reasons for moving to .NET was to perform a tooling reset. They decided it was too hard to use technology like OR/M, DI, Messaging, and MVC. The figured that (straight from the horse mouth) “Webforms, ADO.NET and SQL” is all we need. I don’t even understand that statement…anyway…back to the tools

Of course I believe this is all based on the improper use of technology. As they say “Any tool can become a weapon if held properly”. unfortunately for me and future developers with this client. The technology that was so frond upon is the tool that….um…well…never mind.

All I am trying to say is that I’ve been pretty tied into some specific Microsoft technology most of the year. Most of the tools on this list had to pass through a standards committee meeting and some are still under the radar…Ok on with the tools!

Visual Studio 2008 (2005, Visual Basic, Dreamweaver)

Thankfully most of my work is new development so I spend a bulk of my time in Visual Studio 2008. Unfortunately is not TFS so my task tracking is handled outside….if at all. Also there are no productivity plug-ins available, I even asked if I could install my own…so no ReShaper or Visual SVN

ASP.NET 3.5 SP1 VB.NET

With most of my work new development I do get to keep up with the .NET version. I am REALLY looking forward to .NET 4 (its just 4 right?…I heard someone from MS flies out and you get your hand slapped if you call it 4.0)

ASP.NET MVC

Yeah! what more can I say.

ASP.NET MVC Futures

This one has not passed through the development standards committee yet but since I also sit on the committee I don’t think it will be much of a fight. Really I only use it for Html.RenderAction

WCF

The tooling is rough but the technology is solid. I am really happy with WCF and hope it infects my clients….but I feel that will stick with asmx for a few more YEARS….

EF

I am just not ready to fight for Nhibernate just yet…I have a new project starting around the 20th, as with every new project I try to push through one new technology. I think this one will finally get a OR/M.

I do like where MS is going with EF and look forward to EF 4, isn’t that what its called in .NET 4.0?, but as much as I work with EF 1 ….man its rough. I’ve often considered using Linq2Sql and building on top ala Rob Conery’s MVC Storefront.

AutoMapper

A convention-based object-object mapper.

AutoMapper uses a fluent configuration API to define an object-object mapping strategy. AutoMapper uses a convention-based matching algorithm to match up source to destination values. Currently, AutoMapper is geared towards model projection scenarios to flatten complex object models to DTOs and other simple objects, whose design is better suited for serialization, communication, messaging, or simply an anti-corruption layer between the domain and application layer.

iTextSharp

iTextSharp is a port of the iText, a free Java-Pdf library.

Unity

The Unity Application Block (Unity) is a lightweight extensible dependency injection container with support for constructor, property, and method call injection.

MSTest (unit testing)

Still using the default unit testing framework. Right now I am really focused on getting more developers to write tests…anything…please. Really; there are no tests. Functional testing by non-technical people is NOT testing. Crap…I feel another post coming on…

LINQPad

I am a big fan of LINQ!

LINQPad lets you interactively query SQL databases in a modern query language: LINQ.  Kiss goodbye to SQL Management Studio!

LINQPad supports everything in C# 3.0 and Framework 3.5:

  • LINQ to Objects
  • LINQ to SQL
  • Entity Framework
  • LINQ to XML
Spark View Engine

Spark is a view engine for Asp.Net Mvc and Castle Project MonoRail frameworks. The idea is to allow the html to dominate the flow and the code to fit seamlessly.

It should be noted that I am pretty new to spark and I am testing it in some personal projects to see if its worth bringing into a client. BUT the client has a strict VB only stance…so my testing will not only be standard spark stuff but doing so in a VB.NET MVC project….check out the videos.

jQuery

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

I am a JavaScript nut…primarrly jQuery and Dojo…really happy to see it in MVC because it was denied by my largest client until it started coming out of File->New Project…..Thanks Microsoft

jQuery Facebox w/ homegrown iframe support

Facebox is a jQuery-based, Facebook-style lightbox which can display images, divs, or entire remote pages. It’s simple to use and easy on the eyes.

Bringing in modals was a lot of work; demos, meetings, documents, etc….we went with thickbox….I am using facebox with support for iframe content.

CruiseControl.NET

CruiseControl.NET is an Automated Continuous Integration server, implemented using the Microsoft .NET Framework. Again; under the radar…I have a ccnet server running on my desktop…

FxCop

FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework common language runtime) and reports information about the assemblies, such as possible design, localization, performance, and security improvements.

SVN

Subversion (SVN) is a version control system initiated in 2000 by CollabNet Inc. It is used to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly-compatible successor to the widely used Concurrent Versions System (CVS).

BUT…its 1.3.2….and it has pretty limited support for merges…..ugh…I think you get the picture by now….

WebSVN

WebSVN offers a view onto your subversion repositories that’s been designed to reflect the Subversion methodology. You can view the log of any file or directory and see a list of all the files changed, added or deleted in any given revision. You can also view the differences between two versions of a file so as to see exactly what was changed in a particular revision.

WebSVN offers the following features:

  • Easy to use interface
  • Customisable templating system
  • Colourisation of file listings
  • Blame view
  • Log message searching
  • RSS feed support
  • and more…

And best of all….something about radar…

Feedreader

I use feedreader to monitor the RSS feeds from WebSVN. This way I know what is going on with my teams projects and  other teams projects which my programs are dependant

SourceMonitor

SourceMonitor lets you see inside your software source code to find out how much code you have and to identify the relative complexity of your modules. For example, you can use SourceMonitor to identify the code that is most likely to contain defects and thus warrants formal review

  • Collects metrics in a fast, single pass through source files.
  • Measures metrics for source code written in C++, C, C#, VB.NET, Java, Delphi, Visual Basic (VB6) or HTML.
  • Includes method and function level metrics for C++, C, C#, VB.NET, Java, and Delphi.
  • Saves metrics in checkpoints for comparison during software development projects.
  • Displays and prints metrics in tables and charts.
  • Operates within a standard Windows GUI or inside your scripts using XML command files.
  • Exports metrics to XML or CSV (comma-separated-value) files for further processing with other tools.

Conclusion

I am one stealthy developer…you would think that since I am on the committee that defines developer standards most of these items would be known, understood, or used…..or maybe you think I’m not demoing, teaching, preaching, or begging…well if you think that you don’t know me :)

I am shouting, arguing, and fighting…..ugh…

Tags: , , , , , , , , , , , , , , , ,

ASP.NET MVC New Project Replace Webforms with Spark

Note: This demo is in VB.NET and based on my use of spark on a real project; I can say that this will be the first of a few Spark MVC for VB.NET developers. Spark uses C# in the views; I think its going to be a good way, for me at least, to keep up to speed with both syntax.

It seems that bootstrapping Spark in the global.asa (code in general) is not working for namespaces. I’ll have another post early next week about all my next steps but for now just know you need to add your namespaces to a _global.spark

This demo is the process of getting running with spark and replacing the webforms view engine in a new asp.net mvc project. From soup to nuts as they would say…I guess.

Links:

Spark Download:

http://sparkviewengine.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27109

Spark Master Layout (Master Pages)

http://sparkviewengine.com/documentation/master-layouts

Project Source:

ASP.NET MVC new project with Spark view engine (coming soon)

Tags: , ,

Friday, May 29th, 2009 ASP.NET MVC, Spark, Video, WebForms 3 Comments

Search