about 4 months ago - 1 comment
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/
Related posts:Spark Binaries For ASP.NET MVC RC2
ASP.NET MVC Spark Support
Spark with VB.NET Project Demo #2
Spark View Engine 1.1
ASP.NET MVC New Project Replace Webforms with Spark
about 4 months ago - No comments
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
about 4 months ago - No comments
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
about 6 months ago - 2 comments
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:
Excited to hear this I asked a leading implementation question about honoring the output extension directive in T4 templates.
Us old-timer
about 6 months ago - No comments
Disclaimer: This post is my personal reflection of a current situation. It’s not intended for any other use. Don’t use this information in anyway.
Background
The previous enterprise-grade SOA architected systems I’ve worked on, last decade, were Classic ASP, Java or Webforms. These systems had their presentation layer wired directly into the services. The largest, .NET or
about 6 months ago - 2 comments
ASP.NET MVC has one small hook into Visual Studio, the ability to right click and add views and controllers.
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 –>
about 8 months ago - No comments
public static IList<String> GetClassLevelErrors(object instance){ return TypeDescriptor.GetAttributes(instance).OfType<ValidationAttribute>() .Where(attribute => !attribute.IsValid(instance)) .Select(attribute => attribute.FormatErrorMessage(string.Empty)) .ToList();}
[TestMethod]public void TestMethod1(){ var prop = typeof (DataAnnotationsModelBinderSpike.Models.Contact).GetProperty("First"); var attrib = prop.GetCustomAttributes(true).Cast<RequiredAttribute>().FirstOrDefault();
about 8 months ago - No comments
Need:
To pass information to every view based on an environmental variable. The specific case I ran across this need is when you want to use the minified version of your JavaScript libraries in production and the human readable in dev/QA.
Solution:
Create your own base controller class.
Override either onactionexecuting or onactionexecuted.
Populate TempData with the environment
about 1 year ago - 1 comment
Scenario; you have to pass wildcard requests to a controller for processing. Think myspace.com style vanity names.
Solution: Not as nice as .htaccess but it works; and I think I’m doing it write.
Step 1: Add Routes to Global.asa
1: routes.MapRoute(
2: "Default",
3:
about 1 year ago - No comments
Outline:
Status of using spark in a VB.NET project
Bugs from Spark Demo #1
Strongly Typed Views
No related posts.
about 5 months ago
Hi, we have mvc2 project, and latest sources of Spark from here http://sparkviewengine.codeplex.com/releases/view/27600 and it works fine.
Today i’ve upgraded project to mvc2 rc2 and got compiler error in spark sources.
After upgrading spark sources to ones attached to this article nothing changes, we still can’t build solution.
Can you advice something? Thanks
about 5 months ago
I’d have to see the error to be able to help more.
about 5 months ago
Eric,
I may have found a bug. No doubt posting in this form will mangle the following snippet beyond belief. Feel free to contact me at davidlively _at_ gmail for a better explanation.
Spark will not find a view in a folder named after the controller. For instance, the engine will not find
/Home/index.spark
even if the file exists. Modifying the method PotentialViewLocations in DefaultDescriptorBuilder.cs to
protected virtual IEnumerable PotentialViewLocations(string controllerName, string viewName, IDictionary extra)
{
return ApplyFilters(new[]
{
“~/”+controllerName+”/”+viewName+”.spark”,
“~/Shared/”+ viewName + “.spark”
}, extra);
}
Corrects this problem.
that method to