I'm working on a SharePoint site, and the site eventually needs to be localized to many different languages. We can use resource files, but we'd like for the translators to be able to update those files while the site is live, without requiring developer assistance to recompile, redeploy, etc.
To me, I think the easiest way to do this would be to provide a web application to edit the .resx files as they sit in the App_GlobalResources directory. Does anyone know of some sort of a web-based .resx editor like that? I found one from LavaBlast, but it displays the values for all languages at once. With the number of languages we plan on having, I think that would eventually get unwieldy.
Any suggestions are appreciated.
I used the one you found: http://blog.lavablast.com/post/2008/02/RESX-file-Web-Editor.aspx It took a couple of hours but it works a treat. I think that having the multiple languages editable at the same time is very helpful to avoid getting your resx files out of sync, and to see blank entries easily.
Not a direct solution, but DotNetNuke contains a full lanaguage file editor, you might be able to extract the logic from it for your own use.
Microsoft released a tool called the Enterprise Localization Toolkit you might look at:
http://msdn.microsoft.com/en-us/library/aa479334.aspx
It has been ages since I played with it, but it should fit at least some of your requirements. It is easy enough for a non-techie to use. You do not edit RESX directly, however, so it might not be exactly what you need. You gen them instead and then deploy.
Related
I've been trying to learn how develop websites with ASP.NET as well as setup a personal website to use as a online porfolio/resume. With my website I've decided to not try to reinvent the wheel and thus decided to use a premade ASP.NET based CMS.
After reading a lot of reviews I settled on Umbraco, but now I'm seeking out alternatives. I like Umbraco a lot but I keep running into problems. Since installing it on my host I haven't made any changes through the file system, or database directly. All changes have been through the admin site. Yet somehow I kept getting it into some state where I could not delete a datatype, and now I'm having problems removing or renaming one of my templates. I've searched for Umbraco forums for solutions and usually find that I have to run some SQL script workaround on the database to clean things up. This kind of thing is really not something I want to fiddle with for my personal site.
Has anyone else had a lot of problems with Umbraco like I have? Are there other free CMS systems out there that are more reliable, yet similar to Umbraco? Specifically I really like how Umbraco gives me total control over the HTML generated by my site. Simple is also better in this case. I'm not trying to create some kind social network/community portal/forum/blog site. There won't be multiple people logging onto this site or anything like that.
I've been reading a bit about N2, which I'm now starting to consider. I like that it's more developer based and that you setup page types through real .NET classes in Visual Studio. Again I don't want to attempt to build my own CMS from scratch, but at the same time I really don't like how hard it is to see what's going on under the hood with most other CMS systems.
I haven't used N2 so I can't comment on that, but alternatives you can consider are Orchard or FunnelWeb, both are on MVC 3 and Razor.
If you're wanting a blog that is mostly just a blog then FunnelWeb is a good option.
I'm currently writing a comparison between Orchard and Umbraco if you're interested as well.
I think you'll be happy you stuck with Umbraco. I was so frustrated with Umbraco when I first started working with it for the exact reasons you stated above. The issue with not being able to delete data types could mean that it's connected to something (IE: document or media type) somewhere and if you force delete it (IE: via the db) you could really mess up your install. <- speaking from experience.
I'm absolutely in love with Umbraco now though. I am completely confident that I can build just about anything I need with it now.
I think that my best piece of advice I can pull from my own experience is make sure that you've got your site architecture planned out thoroughly before starting to build it out in Umbraco. You don't want to be fiddling around in there afterward changing things and that's where you can really get yourself into some hot water.
Have fun!
if you want a minimal .net mvc4 cms with good performance check out puck https://bitbucket.org/yohsii/puck/overview
it adds very few concepts on top of what you need to know for .net mvc but it does require .net4.5 (and therefore VS2012) to work with.
it also uses localdb out of the box but if you don't want to install that just attach the database mdf file to regular sql server and change the connection string
Just wondering is there any drawbacks to publishing a ASP .NET web application by copying all the files in it? (That means all the .cs, .csproj files will be included in the published folder)
So far I can think that the published folder's total size may become a little bigger (but that a negligible issue for me).
I would also have some security concerns here as you are posting files to a (production?) server that have no business being there. If one was to compromise your server or find a way to get those files from IIS, they could in theory gain access to all of the .cs files used to create your dll's for your web app. Space is another concern as well.
When publishing the codebehind-files malicious users could access your code, and find an opening for attacks.
I do only the files needed to run the site, but more from an intellectual property standpoint. The business logic and data access stuff is mine. My client gets what they need to run their site and go about their business. They didn't pay me to know how I accomplish those things. I want them to have to come back to me and need me to make a change, not pass it off to someone else who might benefit from my design (although, that's doubtful, I've seen my code).
What, apart from making the publishing process more complex than need be?
I'm thinking of developing the following but wondering if it already exists out there:
I need a SQL based solution for assigning and managing localization text values for an asp.net site instead of using RESX files. This helps maintain text on the site without having to take it down for deployment whenever an update is required.
Thanks.
We actually went down that path, and ended up with a really really slow web site - ripping out the SQL-based translation mechanism and using the ASP.NET resources gave us a significant performance boost. So I can't really recommend you do that same thing.... (and yes - we were caching and optimizing for throughput and everything - and the SQL based stuff was still significantly slower).
You get what you pay for - the SQL based approach was more flexible in terms of being able to "translate" on the fly, and fix typos and stuff. But in the end, in our app (Webforms, .NET 2.0 at that time), using resources proved to be the only viable way to go.
We did this (SQL-Based Translation) and we are really happy with the result! We developed an interface for translation-agencies to perform the updates to the page online. As a side effect, the solution started to serve as content-management system. If you cache your data, performance is not an issue. The downside is, that we invested multiple hundreds of hours into our solution. (I would guess sth. arround 600 hours, but I could check.).
We ended up with a hybrid solution where users could edit content into a database but the application then created a .resx which was deployed manually.
You could also bypass the server translation altogether and do translation in jQuery on the client which is an approach I have used successfully.
I'm not sure about the website restart, but at least using .NET MVC is very convenient and I haven't noticed that restart problem, and, if occurs, how often you need to update the resx files? For bigger projects I use to create a solution with multiple projects, one for the localization, something like this:
MyApp.Localization
Model
Page
File1.resx
MyApp.Core
MyApp.Web
Then in the Web project I add a reference to the Localization project, and use it like
#MyApp.Localization.Model.Customer.CustomerName
#MyApp.Localization.Page.About.PageTitle
#MyApp.Localization.File1.Paragraph1
Everytime I change the translated text, I either upload an updated .dll or copy the .resx files.
NOTE: You need to set your resx files to PUBLIC, so can be accessed as strongly typed.
I created a SQL based translation scheme. But I only load the needed translations for a given page when it is requested, and just the ones for that particular page.
Those get loaded into a dictionary object when the page reloads and cached during the session. Then is just does text replacement based off a lookup on that.
Pretty much all of it is dynamically generated, and includes user defined content that must be translated, so the flexibility is key.
Performance is quite fast, the SQL queries to retrieve all the data take much longer (relatively speaking).
If you distribute a .net web application, and you want a certain module of the application to be disabled, AND you don't want to ship the source with it, is it a reasonable solution to just not include the necessary .dll for that module?
I know you can do things programatically, but as long as you don't ship the .dll things should be ok right?
Reason being some .dll's require you to sell the product commercially, and if I want to give it away for free or as a demo I am stuck.
You have to go for plugin architecture. There's plenty of questions here on SO, as well as MEF which will be used in Visual Studio 2010, plus loads of DI/IoC containters which can aid in creating plugin-based apps.
You should be okay as long as the binary image you do ship doesn't actually need anything in the dll you're not shipping. That includes "does not expose functionality provided by the missing dll's".
For example; don't expose the "download as pdf" button if your pdf tools aren't "installed".
I've done this before by having a sort of plugin system that scans a predefined directory for .dlls and building a list of all exposed classes implementing a certain interface. Might be overkill for what you want though, and it's kindof the other way around than you suggest.
One possible approach (assuming you don't want to or can't go the plugin route) would be to create a dummy DLL with all the same classes and methods in there but that actually doesn't do anything.
Depending on the size and complexity of your DLL this may or may not be a viable action.
The plugin route would be the way I'd approach it though, as whenever the "real" DLL changes you will need to update your dummy one.
You definitely need some kind of 'in code' element, because a lack of DLL will break things in a worse way than simply disabling the modules you had intended.
This will definitely break if you are using Web Site instead of Web Application Project, because the DLL reference must be in your web.config... which will throw an error when it's missing.
You could get away with it in a Web Application Project, but that's a pretty ugly method. Much better to use some sort of plugin architecture, as others suggest.
it seems that I just solved my problem why I couldn't use the ASP.NET Configuration Tool in VS2008. It seems this tool doesn't work when the aps.net solution is located in a folder containing special characters - spaces for example. Actually, I didn't discover this myself. I found it on various forums.
What puzzles me though is that my VS2008 puts new projects (web projects included) into my documents folder which deep down at the root starts with Documents And Settings\[User]\Documents (on XP at least). Am I missing something here or does the default really makes using the ASP.NET Configuration tool impossible to use?
Thanks for you feedback
There is very little I use the ASP.Net Configuration tool for anymore (all it does is modify your web.config), and a lot of things can flub it up, but...
Most of my projects have spaces in the path at some point, and I've never had any trouble with that part.
My advise would be to figure out what it is that you want to do, and learn how to make that change directly in the web.config. (I can hear the down-modding as I write this)