It’s alive! And it tells me what to do!
programming, spark, visual studio December 14th, 2008A while ago I took a moment to reflect on the functionality Spark had accumulated. It seems like the discussion group has been pretty quiet lately. I mentioned that to Tim and he reminded me of something I’d said earlier, “a view engine really only needs to do a handful of things - so much of the work is in framework.” So it might have hit that point where it does what it needs to do and you can call it version 1.
On the other hand if you look at the feedback from people who wouldn’t consider it a viable alternative there’s a definite theme surrounding Visual Studio integration in general and Intellisense in particular. So I decided a few weeks ago to muster up my courage and take another pass at the task of making a Visual Studio integration package to provide a Spark language service.
In an earlier post there was a comment from Pablo Blamirez that provided a really interesting lead with a few of the contained language interfaces. Then earlier last week I had some invaluable assistance from Phil Haack in tracking down some reference material on the subject. And I’m delighted to say all of the ingredients have finally come together, at least in a preliminary fashion.
So let’s see some pictures!
Using Html helper members:

Seeing method parameters and overloads:

Specifying a strongly typed ViewData model:

And a bigger picture with colors and example of Linq Intellisense on collections:

It’s still far from done but getting to this point was a huge milestone.
December 14th, 2008 at 7:04 am
Hooray, Luis! That’s the thing I wanted all the time, I spend writing my views last few month. How could I install package without VS SDK?
December 14th, 2008 at 11:07 am
That might be possible in a bit - it’s *really* rough right now and there are several known problems. Other than that it seems you need to get some sort of authentication binary to embed in the package dll for Visual Studio to load it without having the SDK installed.
But that should come together fairly quickly now that the hard part is done.
December 14th, 2008 at 12:12 pm
Louis, this is very cool. I spent some time yesterday digging through your Spark code and syntax and I’m looking forward to using SparK in one of my projects.
Chris
December 14th, 2008 at 3:10 pm
Hi Lou, I hope you will write a bit on how you got IntelliSense to work on your custom view engine.
December 14th, 2008 at 4:14 pm
Glad to help and I’m excited about your progress! All I did was put you in touch with the right people. They’re the ones who really helped! :)
December 14th, 2008 at 4:14 pm
This is really cool
December 14th, 2008 at 4:17 pm
I think this will finally push me over the top as a Spark enthusiast. I’ve previously mentioned that I liked the NVelocity syntax slightly better, but aside from aesthetics, Spark didn’t seem to offer me much that NVelocity didn’t do. It was still weakly typed/interpreted, no intelli-sense, and no refactoring support.
Looks like I was wrong! Does this mean that compiled views & refactoring with ReSharper could potentially be doable?
December 14th, 2008 at 4:20 pm
This is awesome, Louis!
December 14th, 2008 at 7:10 pm
@Phil I should thank Bill Hiebert as well. That was some very useful information he had written.
@Ben, Yep, the views are compiled. There are some things you can do to pre-compile into a deployable assembly for medium-trust hosting. You’re not allowed to compile code in a shared environment.
It’s an interesting question about refactoring. It’s hinted at in some of the vs interfaces. It’ll probably take some looking into.
@Simone I probably will at some point after getting the remaining details ironed out. It’s very clever how VS implements contained languages.
December 14th, 2008 at 9:26 pm
This is great news! While I’ve enjoyed playing with Spark in my personal time and was already considering using it for my next personal project, there is no way I could push Spark on the other developers at work without this kind of functionality. I’m looking forward to using this when you release it.
December 14th, 2008 at 10:16 pm
Note that refactoring support might be very challenging as there is currently no refactoring support for code in the .aspx files of a web form.
December 15th, 2008 at 12:57 am
Wow, Louis you really did it!
Great work, I need to have a look at the visual studio integration code for this! This really sets Spark apart from other alternativ view engines :)
December 15th, 2008 at 2:34 am
[...] It’s alive! And it tells me what to do! - Louis DeJardin shows off some screenshots of intelisense support for the Spark view engine in Visual Studio. [...]
December 15th, 2008 at 1:30 pm
Wow - grats! I’ve been wanting to use Spark, and this was really my last real ‘reason’ not to. Thanks! =)
December 15th, 2008 at 1:39 pm
Already adopted for what will be the project of my life. This syntax coloring and intellisense support will be so welcome!!
December 15th, 2008 at 2:10 pm
Congratulations Louis! Thats a huge achievement and I’m sure it will really help in the adoption of spark. I don’t know how you find the time :-)
December 15th, 2008 at 11:18 pm
Ah, if refactoring it’s supported in aspx I’m sure that rules that out.
Thanks all for the enthusiasm!
February 22nd, 2009 at 9:33 pm
[...] Intellisense for the Spark View Engine: Louis DeJardin shows off some delectable screenshots of intellisense for the Spark View Engine…totally…freaking…awesome! [...]