Easy Deployment of Coldfusion Apps on the Cloud

24. January 2013 16:36 by Mrojas in   //  Tags: , , , ,   //   Comments (0)

There are now a lot of Cloud Offerings. Amazon, Azure and I also really like Jelastic!

Jelastic is a great hosting environment for Java and PHP, but can it be used for ColdFusion. Sure!!

They have a very nice guide: http://blog.jelastic.com/2012/02/07/the-easiest-way-to-deploy-coldfusion-to-the-cloud/

Can you do the same with Azure or Amazon. Sure.

For example see this guide: http://www.windowsazure.com/en-us/develop/java/tutorials/tomcat-on-a-virtual-machine/

Once you have a vm with java you just deploy the coldfusion EAR and that's all :)

 

VM's policies are too old to be run by this version

23. January 2013 20:46 by Mrojas in   //  Tags: , , , , , , , ,   //   Comments (0)

I don't know why but I took one virtual machine from my computer to a clients office and when I tried to open it with VMware 9 I started getting a strange error: "VM's policies are too old to be run by this version"

What was that?

Well, I don't know yet, but my workaround was:

 

1. Go to the directory with the Virtual Machine files

2. Find <vm>.vmpl file and rename it to donotuse <vm>.vmpl

3. Double click the <vm>.vmx file

4. It will fail indicating that a file was not found

5. Open the <vm>.vmx file with notepad.exe. Look for something like:

policy.vm.mvmtid = "52 32 e7 62 63 ea 0d 0d-3a 55 cd 4c 11 69 ee e6"
policy.vm.managedVMTemplate = "FALSE"
policy.vm.managedVM = "FALSE"

Erase those three lines.

5. Save the file

6. And voila I was now able to open my virtual machine :)

Connect to MS Access from C/C++/PHP

21. January 2013 11:51 by Mrojas in   //  Tags: , , , , , ,   //   Comments (0)

Again Access... hey Access was a great database.

So if you are using access and you are thinking in how to use it from PHP or from a C/C++ app then you should check 

mdbtools

Does it work on iOS, well there is a discussion about at (http://old.nabble.com/Port-libmdb-(mdb-tools)-for-iOS-td34282658.html)  but I think there might be some licensing issues.

If that is the case I would recommend writting your own version of mdbtools, Take a look at https://github.com/brianb/mdbtools/blob/master/HACKING for detail info about the file format.

Connect to MS Access from C/C++/PHP

21. January 2013 11:51 by Mrojas in Access  //  Tags: , , , , , ,   //   Comments (0)

Again Access... hey Access was a great database.

So if you are using access and you are thinking in how to use it from PHP or from a C/C++ app then you should check 

mdbtools

Does it work on iOS, well there is a discussion about at (http://old.nabble.com/Port-libmdb-(mdb-tools)-for-iOS-td34282658.html)  but I think there might be some licensing issues.

If that is the case I would recommend writting your own version of mdbtools, Take a look at https://github.com/brianb/mdbtools/blob/master/HACKING for detail info about the file format.

Connect to MS Access from Java

21. January 2013 11:13 by Mrojas in   //  Tags:   //   Comments (0)

This is not an scenario that I commonly find, but now with Android and with the spread of Linux base environments an devices you are just don't want to be limited to just one technology.

So I found this library which I found extremely useful and I can recommend: 

Jackcess

Connect to MS Access from Java

21. January 2013 11:13 by Mrojas in Access  //  Tags: , , , , ,   //   Comments (0)

This is not an scenario that I commonly find, but now with Android and with the spread of Linux base environments an devices you are just don't want to be limited to just one technology.

So I found this library which I found extremely useful and I can recommend: Jackcess

 

The following are some code samples from the Jackcess library

  • Displaying the contents of a table:
    System.out.println(Database.open(new File("my.mdb")).getTable("MyTable").display());
    
  • Iterating through the rows of a table:
    Table table = Database.open(new File("my.mdb")).getTable("MyTable");
    for(Map<String, Object> row : table) {
      System.out.println("Column 'a' has value: " + row.get("a"));
    }
    
  • Searching for a row with a specific column value:
    Map<String, Object> row = Cursor.findRow(table, Collections.singletonMap("a", "foo"));
    if(row != null) {
      System.out.println("Found row where 'a' == 'foo': " + row);
    } else {
      System.out.println("Could not find row where 'a' == 'foo'");
    }
    
  • Creating a new table and writing data into it:
    Database db = Database.create(new File("new.mdb"));
    Table newTable = new TableBuilder("NewTable")
      .addColumn(new ColumnBuilder("a")
                 .setSQLType(Types.INTEGER)
                 .toColumn())
      .addColumn(new ColumnBuilder("b")
                 .setSQLType(Types.VARCHAR)
                 .toColumn())
      .toTable(db);
    newTable.addRow(1, "foo");
    
  • Copying the contents of a JDBC ResultSet (e.g. from an external database) into a new table:
    Database.open(new File("my.mdb")).copyTable("Imported", resultSet);
  • Copying the contents of a CSV file into a new table:
    Database.open(new File("my.mdb")).importFile("Imported2", new File("my.csv"), ",");

Remember that if you want to use it android you use some tweaks:

"The following steps will make Jackcess compatible with the Android platform.

  • Set the system property "com.healthmarketscience.jackcess.brokenNio=true"
  • Set the system property "com.healthmarketscience.jackcess.resourcePath=/res/raw/"
  • Copy the *.txt, *.mdb, and *.accdb files from the "com/healthmarketscience/jackcess/" directory in the Jackcess jar to the "/res/raw" Android application directory.
  • Before executing any Jackcess code, set the current Thread's context classloader, e.g. "Thread.currentThread().setContextClassLoader(Database.class.getClassLoader())"."

Migrate MS Access to SQL Server Compact Edition

21. January 2013 01:10 by Mrojas in Access  //  Tags: , , , , , , , , , ,   //   Comments (0)

Visual Basic and Access were a great combination. They allowed the creation of small powerful apps, specially apps for data collection, or just applications that needed a small database that could run standalone.

A good option when you are upgrading your Access database and you do not need a centralized SQL Server (or that is just too much for your environment) is to migrate to other options like SQLite or SQL Server.

SQL Server has now  a lot of versions (SQL Server Compact 3.5, SQL Server Compact 4.0, SQL Server Express and now even SQL Server LocalDB) a good table that compares this databases feature by feature can be located here: http://erikej.blogspot.com/2011/01/comparison-of-sql-server-compact-4-and.html)

If what you need is to support a simple, small (less that 4G) standalone database then using SQL Server Compact edition might be for you.

The main version for SQL Compact as at the moment 3.5 and 4.0.

Moving from Access to SQL Compact is not hard. There are many third party tools some free some not: http://erikej.blogspot.com/2009/04/sql-compact-3rd-party-tools.html 

Primeworks tools are very easy to use, but you can also use the Microsoft SQL Server Assistant for Access (good links for this tools are in MSDN http://msdn.microsoft.com/en-us/library/hh313039.aspx and also the SSMA Blog http://blogs.msdn.com/b/ssma/)

 

SQL Server Compact uses the ADO.NET and OLE DB providers, and in many scenarios is just what you need. So take it as an option if you just need a replacement for MS Access

 

 

Move code from .vb to .Designer.vb

18. January 2013 16:00 by Mrojas in VB.NET  //  Tags: , , , , , , , ,   //   Comments (0)

If you still have Visual Studio 2003 projects and you are just in the process of upgrading / modernizing them, then the following addin will be very helpful. Mike Meinz, took a very useful macro and package it as a VS 2012 addin

See: http://www.codeproject.com/Articles/528990/A-Visual-Studio-add-in-to-move-Windows-Forms-Desig

For us who each day move lots of code from Vb6 and VB.NET to MVVM. ASP.NET MVC, etc, this kind of tools become very handy.

 

 

 

 

Simplify app deployment in .NET

11. January 2013 01:51 by Mrojas in deployment  //  Tags: , , , , , , , , , ,   //   Comments (0)

 

The web platform provides an excellent mechanism simplify your app distribution and deployment issues.  

There is no longer a need for CD-ROMs, or to send a computer technician to install the app on each client computer. Other related problems such as verifying that the client has the right application version, application dependencies and security can be simplified.  

When you modernize your legacy app with Mobilize.Net\Artinsoft you could take advantage of several options. In terms of application distribution\deployment thru web technologies or running your application inside a web browser we have several post describing different way of doing this.  
 

Using ClickOnce deployment over the web to simplify Windows Form Application deployment 

Embedding Windows Forms Applications directly in a WebBrowser  

Embedding Windows Forms Applications in a WebBrowser using XBAP  

Silverlight as a mechanism for simplification of application deployment  

WPF applications distribution on the browser using XBAP  

 

Use HTML5 deploy your applications everywhere 

WPF applications deployment on the browser using XBAP

11. January 2013 01:44 by Mrojas in deployment, WPF, XBAP  //  Tags: , , , ,   //   Comments (0)

WPF is great and powerful technology to create compelling Windows Desktop applications when you need a rich user interface. 

Artinsoft/Mobilize.NET provide tools and services that allows you to modernize your VB6, Windows Forms and Powebuilder apps to WPF. Once your applications are on WPF you can also benefit from features like XBAP... 

From Wikipedia: 

"XAML Browser Applications (XBAP, pronounced "ex-bap") are Windows Presentation Foundation (.xbap) applications that are hosted and run inside a web browser such asFirefox or Internet Explorer. Hosted applications run in a partial trust sandbox environment and are not given full access to the computer's resources like opening a new network connection or saving a file to the computer disk and not all WPF functionality is available. The hosted environment is intended to protect the computer from malicious applications; however it can also run in full trust mode by the client changing the permission." 

XBAP is in general a simplification of the Click Once deployment, but specifically for WPF applications.