26 11, 2013

MVVM Pattern

By |2020-12-16T09:26:42+01:0026th November 2013|Frontend, Full Stack, Software Engineering|0 Comments

As stated by Microsoft: "Using the MVVM pattern, the UI of the application and the underlying presentation and business logic is separated into three separate classes: the view, which encapsulates the UI and UI logic; the view model, which encapsulates presentation logic and state; and the model, which encapsulates the application's business logic and data." [...]

26 11, 2013

Calling WCF REST service from JavaScript

By |2020-12-16T09:26:54+01:0026th November 2013|Frontend, Full Stack, Software Engineering|0 Comments

Without further ado, here is a javascript class that can be used to call a WCF REST web service: // ---------------------------------------- // ---------------------------------------- // Class WcfService // // Dependencies: // JQuery // // ---------------------------------------- // Constants // ---------------------------------------- WcfService.URL_LOCATION_LOCAL = document.location.protocol + "//" + document.location.host + "/"; WcfService.DATATYPE_JSON = 'json'; WcfService.CONTENTTYPE_JSON = 'application/json; charset=utf-8'; WcfService.MSG_PREFIX [...]

3 07, 2013

Using data-* attributes in ASP.NET MVC

By |2020-12-16T09:27:17+01:003rd July 2013|Frontend, Full Stack, Software Engineering|0 Comments

Starting from MVC 3 and up this issue has been addressed. From MVC 3 and up underscores in HTML attributes are automatically converted to dashes. Here's an example: @Html.TextBox( "tbxOne", "", new { @data_id = "someId", @style= "width:120px; text-align:right;" }) This wil result in: <input data-id="someId" name="tbxOne" type="text" value="" />

Go to Top