GetCalendar: Part 1.

Hi,

Even though I am facing the coding versus blogging about it dilemma. I`ll give blogging a try to inform you about the progress of the app.

Prerequisites

1. First of all I used to work on Windows and particularly I have 7. As a consequence I have IDE that works under Windows. But modern IDEs can work across various platforms. So choose what you want most. In addition, it is possible to use virtual machine to combine a few OSs on one PC.

2. There is a need to install and set Maven in order to manage project dependencies in a simple and efficient way.

3. GetCalendar prototype is built with IntelliJ IDE. To get free Community Edition go here. This decision was made on the basis of familiarity and speed of development with IDE.

4. The project  make use of Spring framework. That is why there is a need to create new Spring project using Template in IntelliJ. Spring is a modern and lightweight framework for backend development with Java.

5. This prototype will be implemented as web-service based on REST API architectural style.

6. Since this is a prototype the main goal is speed of development, that is why it is useful to have a simulation of client application that will make requests to server side. For this purpose DHC (Dev HTTP Client ) application by Filip Kolarik will be used.

The goal so far

All this is fine and great but the preliminary goal is to make the simplest working web-application that will be able to get request for current week in Google Calendar and will display it in your favorite web browser.

OK. Until next time…

Java Code Geeks

Advertisements

Back up and restore. Azure hidden corners.

Hello everybody, If you wanted to back up your database in Azure and then restore it you`ll like this post. It seems all the tutorials there somehow do not cover this simple way of backing databases. Microsoft Azure is one of the places to create your website and simple enough platform to manage it. But backing up and restoring database there is not so easy and intuitive. There are a number of ways to handle database (DB) in Azure. It can be done programmatically, it can be done with the help of Azure feature of backing and restoring or it can be done manually. Today`s post is all about backing up and restoring databases in Microsoft Azure cloud platform manually. Before we can proceed there is a number of prerequisites to be fulfilled. Pay attention that below software is free except of paying for database in Azure. More details about pricing here.

  1. You`ll have to create Azure account to be able to create there web site. One detail that be aware of when creating an account you`ll need to provide credit card details even when you open free preview account.
  2. Some version of Visual Studio say VS Express 2013 for Web to code your website using your technology of choice say ASP.NET MVC 5.
  3. Than create there your website and then attach to it SQL database.
  4. Next you`ll need to install MS SQL Server 2012 Management Studio Express(SSMS) or later version to manage databases.
  5. One last thing is to Link SSMS to SQL Azure to be able to import/export SQL DB manually from and to Azure.

OK. That`s say you`ve created a website in Azure. In addition you created a website in Visual Studio targeting SQL database in Azure. To deploy your database there is a need to update connection string in Web.config file in your solution.

 

Where Source=ServerName; Initial Catalog=TargetDatabaseAtAzure. Detailed explanation on how to configure this string here. In general connection string is taken from Azure.

Working with multiple migrations in ASP.NET MVC 5. Based on Pluralsight course by Scott Allen

1.  Add migration to relevant folder

Add-Migration -ConfigurationTypeNameBooks.Web.DataContexts.IdentityMigrations.Configuration “UpdateX”

2. Update development/production database (change connection string)

update-database -ConfigurationTypeNameBooks.Web.DataContexts.IdentityMigrations.Configuration -verbose

Backup and restore Azure SQL database with MS SQL Server 2012 Management Studio Express.

Backup

1. Open SSMS.

2. Connect to local server.

3. Right click on Databases folder->Import Data-tier Application

3.1 SSMS have to be configured for connection to Azure SQL

(get connection string to Azure DB from Azure)

4. Next-> Import form Windows Azure. Etc.

To restore DB from SSMS to Azure.

1. Open SSMS.

2. Connect to Local server.

3. Right click on the DB to be imported ->Tasks-> Deploy database to SQL Azure

4. Connect to Azure server.

5. Deploy SQL database.

It is good to know that today`s Azure has a new feature of DB backup and restore built-in.

Java Code Geeks