How to localize ASP.NET MVC + Spark application? - asp.net-mvc

I'm using the Spark view engine, and want to localize the website. The methods described for 'conventional' MVC view engine do not work. Has anyone done this already? Any help would be appreciated.

The spark release package includes some sample projects, and one of them is called "Internationalization". I haven't had a look myself yet since I am just getting started with Spark, but it seems to be what you are looking for.

Related

How to use plugins in php mvc framework

I want to know that , i am using my own (modal view controller) framework and want to add some plugins like live chatting ,Facebook/g-mail/twitter (sign up/sign in using these websites).
type of features how can i do this?
I am novice in this field so sorry in advance if my question has some stupidity.
I am using notepad++ editor.
thanks in advance.
Use observer pattern or Event dispatcher pattern for plugins.
Have a look how other frameworks allow you to implement these features.
If one of those features just need js/css and custom html markup to work (like a Facebook like-button for example), you might find some inspiration from Zend Framework's View Helpers.
Search through github/packagist if one of those features has not yet been developed. If you find some library, find a way to use it in your custom code.

Create a plugin based controller in Umbraco

How to create a plugin based controller in Umbraco? I have followed the guide on https://github.com/Shandem/Umbraco4Docs/blob/4.8.0/Documentation/Reference/Mvc/surface-controllers.md.
But when browsing to ~/umbraco/areaname/controllername I get a 404. The only way not getting this is removing the plugin attribute. But I want to use the plugin architecture. So what else needs to be done besides the instruction mentioned in the guide.
The documentation is really awful if you want to get started with Umbraco and MVC.
By the way I am using Umbraco 6.
you're area needs to be under the App_Plugins folder.
Sorry misunderstood the question, but it seems you figured it out as you explain in the post linked bellow.
http://our.umbraco.org/forum/developers/extending-umbraco/39704-Create-a-plugin-based-controller-in-Umbraco

Do ASP.Net MVC Portable areas work with Umbraco?

I have an Umbraco website that I want to extend. I feel that ASP.Net MVC is the way to go for the extension I'm writing - I particularly like the idea of a Portable Area from MVCContrib. What I'm wondering is, how straightforward would it be to incorporate the Portable Area into Umbraco without recompiling the source?
More generally, is it possible to wire a portable area into an existing application just by modifying web.config? I'm thinking along the lines of creating a HttpModule and including that in web.config.
No, portable areas require a VirtualPathProvider to be set. VirtualPathProviders must be configured via code.
You could try some hacktastic approach using the App_Code folder. It may work.
The current version of Umbraco (4.x) is based on the web-forms model so it won't be easy incorporating MVC into it (though I believe Umbraco 5 - still in planning - will be MVC based).
Generally you either user XSLT or web-form User Controls to add functionality to an Umbraco site. However, I'm not clear what the "extension" you are writing actually does? Perhaps you could expand upon what it is designed to achieve?

ASP.NET MVC for Ruby on Rails developers?

Long time lurker, first time poster. I'm a self-taught hacker that learned Ruby on Rails to start. At work I've been allowed to work on a web app--the only catch is I have to use ASP.NET. This technology choice is mandated, as much as I'd prefer to use Rails.
There's dozens of "Rails for .NET/PHP/Java Developers" books and blog posts but I haven't found any going the opposite direction, from Rails to .NET.
Could someone please give me an overview of how a typical Rails app would translate over to ASP.NET MVC? I'll research the details of the IDE, C#/VBscript, etc. But what are the possible equivalents to:
Generators
Gems/Plugins
Databases
Migrations
Routes
Models (ORMs)
Controllers (InheritedResources)
Views (layouts, templates, partials)
Rails Console
Test Units/Specs
etc. anything else I'm forgetting
I assume a lot of the Rails niceties I take for granted like route-based helper methods, and simple macro association declarations will not be possible. :(
Thank you so much!
I think what you'll find in the .Net world is that you have a lot of choices to make. Rails is nice because it provides all of that stuff in one place, but developing for .Net you'll have to piece together a solution of your own.
Generators - There are various code generation facilities, but each one is for a different piece. Eg, you can get MyGeneration that will generate code based on a database.
Gems/Plugins - No uniting system for this; Components can be found on the web and you would download either the source or the .dll, then you would add a reference in your project to the assembly (.dll).
Databases - you can connect to pretty much anything; You'll probably find the most guidance for an MS SQL Server.
Migrations - I don't know of a direct method for this in the .net world; I usually write SQL code in SQL and run scripts on the server manually as part of deployment.
Routes - ASP.Net MVC includes routes, look in the global.asax.cs file that gets generated when you create a project for example.
Models (ORMs) - ORMs for .Net are all over the place. Included as part of .Net are things like Linq-to-sql and the Entity Framework. Outside of MS you can find many, but I'd probably recommend NHibernate.
Controllers - Built in to .Net MVC; You get to write the code.
Views - Built in to .Net MVC; Once again you get to write them. MasterPages allow you to get the same general layout on all your pages(including common header/footer, etc), Web Controls (.ascx files) allow you to do a partial view.
Rails Console - I don't know exactly what this provides (I'm a .net developer interested in learning Rails, but haven't spent much time yet); Visual Studio lets you debug applications, step through code, etc. I don't think there are any consoles available to test code outside of just writing the code, compiling, and running it.
Test Units/Specs - There are a few test frameworks for .Net (MS has a framework included, NUnit is one alternative). For specs and such, probably google around for Behavior Driven Design and see what exists.
There are a couple of .NET ports of RoR migrations. I have used migratordotnet and FluentMigrator. Both work as expected but I prefer FluentMigrator. It is more full-featured (e.g. can create indexes) and I like the fluent style.
LINQPad is your equivalent to Rails Console.. see here:
https://stackoverflow.com/a/9403457/1029644
You should download Visual Studio 2008 Express, and download ASP.NET MVC 1.0 (I wouldn't download ASP.NET MVC 2.0 yet because it's only in RC. Wait until it hits 2.0 final).
You can also check out the Nerddinner walkthrough. It's very helpful when learning ASP.NET MVC.
Generators
Do you mean code generators? Ew.
Gems/Plugins
If you want functionality, you can either build it or see if a JQuery plugin exists for it.
Databases
The Database is accessed through your model.
Migrations
?
Routes
Routing is handled by the framework, and you can add routes in the Global.asax.cs file.
Models (ORMs)
Models are indeed still called 'Models', and in ASP.NET MVC, if you use LINQ-To-SQL, the model is generated for you when you drag your database tables in. You can use the Repository pattern to access the database model.
Controllers (InheritedResources)
Controllers are still called controllers.
Views (layouts, templates, partials)
There are different types of View Engines, but the one provided with ASP.NET MVC should do well at first.
Rails Console
I'm guessing you mean the IDE/Debugger? You can build and debug an ASP.NET MVC app inside of Visual Studio.
Test Units/Specs
You can use NUnit, or you can use MSUnit. MSUnit is already integrated with Visual Studio, but NUnit can be.

Has anyone got NVelocity working with ASP.NET MVC Preview 5?

I'm guessing I need to implement an NVelocityViewEngine and NVelocityView - but before I do I wanted to check to see if anyone has already done this.
I can't see anything in the trunk for MVCContrib.
I've already seen the post below - I'm looking specifically for something which works with Preview 5:
Testing ScottGu: Alternate View Engines with ASP.NET MVC (NVelocity)
Otherwise I'll start writing one :)
There's an NVelocity implementation in MvcContrib. You need to reference the MvcContrib.Castle dll.
Personally I don't have a clue about NVelocity, but here is a link that might help you.

Resources