Apache Cordova and Visual Studio 2015 – To Do sample application

I want to explore Apache Cordova and the new tools available at Visual Studio 2015.

There is a sample application walkthrough we can use to practice Cordova with VS 2015, I selected the AngularJS version of the sample. You can also find the source code for the sample here Source Code Link.

The application keeps record of to do activities users enter. It stores the tasks in a local Html5 storage and, if you have access, in a Azure SQL server database using an Azure Mobile Service.

Had no issues following the walkthrough up to making it work with the local storage. The problem was when I tried to use Azure storage through the mobile service: the application simply didn’t  show any data neither saved it to the database.

It result that I had to configure the mobile service and add the table from it, so, I created another mobile service from Azure console, and followed the steps at the link Configure Mobile Service. Then, I went back to the code and set the Mobile Service API Key and the Url of the service at the service file azureStorage.js.

 

Running sample on Android VS 2015 emulator

Running sample on Android VS 2015 emulator

Cordova allows access to functionalities like geo location, camera, etc. while using JavaScript and AngularJS, TypeScript and other known web development frameworks.

I think there are good opportunities for taking advantage of all of these technologies so to quickly develop apps and avoid difficult to maintain mobile applications, developed in native to the device code.

I plan to keep improving on web development frameworks, specially JS, AngularJS and TypeScript. I’m sure we will find a good business use of them at my job at Zgura!

Cheers,

Danfer.

Access to Login ASP.Net Login control objects, code behind

This post is about Web Forms. We still have some legacy applications using that platform. Although our main direction is MVC, we still support them. Here a sample for the subject matter:

RequiredFieldValidator req1 = Login1.FindControl("Req1") as RequiredFieldValidator;

req1.ErrorMessage = "My text";

var text = CCContent.GetStringContent("MustRegisterPassword");

RequiredFieldValidator req2 = Login1.FindControl("Req2") as RequiredFieldValidator;

req2.ErrorMessage = text;

 

In the case of req2 assignment of variable text, I obtain that text from a static method in our code. That access our Zgura’s content management framework. This content framework stores local or specific content for different applications. It uses a NoSQL repository for the data (Azure Tables) and will be matter of separated post.

Cheers,

Danfer.

What I’m currently working on, Azure NoSQL tables

At Zgura I’m working on Azure NoSQL databases, using Azure tables. We are using that for different sites content storage.

We have used Azure SQL as storage for content (localization values) in other project. First impression, new NoSQL seems to be faster than the SQL solution, will set monitoring using New Relic on the NoSQL application so can compare data already have for the application that uses SQL repository for content.

I already know, from New Relic that one of the most resource consuming task on pages load for the application that uses SQL content repository, is reading the content values.

Until that.

Cheers,

Danfer.

What I’m doing starting March

this week I’ll continue working on Twilio integration with our web applications at Zgura.

My colleague Anders has added references to Twilio using Nuget. It’s great to see how you can use Twilio extensions for MVC, including TwilioResults.

Very important, before being able to use SIP integration with Twilio, set the voice URL Twilio will use for requests on SIP call. You do that at Twilio site, SIP options. Be aware (at least it was that way last week I was using it) that you can set the type of request for the voice URL. If you make a change to the SIP configuration, request type returns to POST, even that configuration hasn’t been changed. Ensure to review and set it back to GET, if that is the type of request required.

Also this week I’ll be finishing work on another system we are working on, production process management and data collection.

Finally, keep studying for certification (web development). There is a sample application I want to study too: SocialGoal sample app.

Cheers, Danfer.

Starting the year – Improvement through creativity

First post for 2014. I made my New Year’s resolutions, professional field, creating great software with Zgura:

  1. Learn, get certified for Web development, exams 70-480, 70-486 and 70-487 link
  2. Apply SOLID development principles
  3. Always try to improve through creativity

On 3, I’d like to comment on the ideas expressed at Fareed Zakaria GPS program, in an interview to Elon Musk GPS link, summarizing, people working at his company must not just develop technology, they must improve on what has been developed. Just doing one work is not enough, need to improve on existent work.

As such, I’d like to share on an improvement I just implemented, developing on work already done by my colleagues at Zgura:

As we develop ASP.Net MVC apps and deploy continuously from Git into Azure Websites, one website for each stage of development and branch on source control (i.e., development, test, production) we wanted to set and use configuration environment variables for between other things, connection strings to databases, in Azure Websites and get them from Environment variables, using:

public static string ConnectionString
        {
            get
            {
                return Environment.GetEnvironmentVariable("APPSETTING_ConnectionString,"varname");
            }
        }

But after implementing that, we had an issue when trying to do local debugging as the application doesn’t have access to the environment variables repository. A solution I found was to add that variables at Application_Start, under Global.asax.cs:

#if DEBUG
            Environment.SetEnvironmentVariable("APPSETTING_ConnectionString","varname");

#endif

Cheers.

P.d.

As per a comment from my friend Salvador Aguilar, I’d like to show a screenshot of deployment configuration into Azure websites.

Continuous Deployment Azure

Mi blog en Azure Websites

Como verán, estoy moviendo mi blog a Azure Websites. El motivo: desde hace tiempo vengo trabajando y especializandome en esta tecnología y por eso quiero sacarle el máximo de provecho.

Además, quiero darle continuidad a mi blog y que mejor excusa que utilizer esta tecnología.

Algunos de lo tópicos que estaré mencionando en mi blog serán:

  • Experiencias para obtener mi certficación MCSD Web Apps Certification, uno de mis objetivos para este año, en preparación
  • Lecciones aprendidas, desarrollando con Windows Azure, Web Applications, MVC 4 y EF (Entity Framework)
  • Mis participaciones en charlas como los Coding Dojo en www.IQUELO.com

Saludos.