What’s the least redundant way to make a site with JavaScript-generated HTML crawlable?

Why didn’t I think of this before! Just use http://phantomjs.org. It’s a headless webkit browser. You’d just build a set of actions to crawl the UI and capture the html at every state you’d like. Phantom can turn the captured html into .html files for you and save them to your web server. The whole … Read more

The tag helper ‘input’ must not have C# in the element’s attribute declaration area

If you don’t need to use the TagHelper, you can use <!elementName> to disable it for a specific element: <!textarea class=”testClass” asp-for=”testId” @readonlyAttribute>@Model.Id</!textarea> See @glenn223’s answer for a more structural solution. I made an improved version of his solution, by adding support for anonymous objects: using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Razor.TagHelpers; namespace {YourBaseNameSpace}.Helpers.TagHelpers { [HtmlTargetElement(Attributes = “custom-attributes”)] … Read more

What are the main advantages of MVC pattern over the old fashioned 3-layer pattern

The separation of concerns that’s quoted as being an advantage of MVC is actually also an advance of a 3-layer/3-tier system. There too, the business logic is independent and can be used from different presentation tiers. A main difference is that in classic MVC the model can have a reference back to the view. This … Read more

In the Model-View-Controller principle, what is the Frontend and what is the Backend?

OK.. first the terms: Frontend – are the parts, which are visible to users: HTML, CSS, client-side Javascript. It all is basically “frontend”. In a desktop application frontend would be the GUI. Backend – is the invisible part. In web applications that is your java, ruby, php or any other serverside code. It can be … Read more

Should authorization be part of the model or controller?

I think this is a grey area. One could argue that the user access is part of the mapping between the HTTP world and the Object-Oriented world. This is what the controller is intended for (hence the heavy use of statics), to transform the incoming request, ready to process the business rules on the domain … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)