SEARCH
TOOLBOX
LANGUAGES

Frequently Asked Questions

From Morfik Wiki

Jump to: navigation, search


Contents

1 General

2 Deployment and Hosting

3 Installation

4 Database Connectivity

5 Programming


General

How do I get started? Is there a “Hello World” example for Morfik?

Morfik’s equivalent of “Hello World” is built into its default project template.

To see this, please follow the steps below:

  1. Run Morfik
  2. Create a new project by clicking on the “New Project” button on the ribbon (the second button from left).
  3. Hit the run button (the green button on the top left corner)

You should see a Morfik application running in the browser shortly after pressing the run button.

What is uniquely different about Morfik?

At the heart of Morfik there is a compiler that takes the source code written in a high level object oriented language such as Visual Basic, Pascal and C# and, after enforcing the referential integrity of the entire underlying business logic and code, compiles it into cross browser compatible, highly optimised and efficient JavaScript code. This approach is fundamental to developing large and complex business application because finding and fixing logic bugs at design time are very difficult in interpreted environments such as JavaScript.

How is Morfik different to other tools in this area?

Morfik integrates all the tools for developing and deploying Rich Internet Applications on the Web 2.0 platform in a uniquely unified environment. No longer are developers forced to use multiple tools from multiple vendors to develop graphics for interface elements, scripts for the browser side code, scripts for the server side business logic, frameworks for interface components, databases for data storage, query engines/designers for data retrieval, report writers for data analysis, code obfuscators for protecting intellectual property, servers for hosting the application as well as utilities such as compilers and debuggers. You will find that all these tools are built into Morfik.

What is Morfik’s approach to the graphical design aspect of a web application?

For the past decade the web has continuously moved towards visually striking content. The ever-increasing sophistication of web graphics has been primarily driven by the sales and marketing needs of businesses. While eye-catching graphics add beauty to a web page, business applications on the web platform need both beauty and brains! To this end Morfik has strived to strike the correct balance between graphics and business logic.

Morfik provides a wide range of easy-to-use advanced graphical tools without resorting to an external image editing tool or requiring advanced graphics skills on the part of the developer. Based on the developer’s design specification, Morfik automatically generates images at compile time and efficiently incorporates them into HTML and JavaScript at runtime through the highly effective image-bundling technique performed by the compiler. Unlike other tools for building Rich Internet Applications, Morfik achieves this without the need for proprietary extensions for the browser.

How does Morfik do page layout differently?

With the exception of Morfik, all current tools for developing Rich Internet Applications focus on the aesthetics of individual graphic elements at run-time and pay little or no attention to the process of layout of the page at design time. The result is inflexible layouts that do not respond well to AJAX techniques where content is dynamically changed without refreshing the page.

Morfik offers a unique way for developers to layout controls on web pages. It allows developers to design pages using a fixed/absolute positioning, which is standard practice amongst software developers, and yet allows for a content-flow layout, which is standard amongst web designers at run-time. The level of plasticity (that is, how fixed or how fluid) can be specified both at design-time as well as run-time.

This unique approach makes page layout infinitely easier for building Rich Internet Applications when compared to the use of conventional HTML editors, and at the same time, all the advantages of the fluid HTML layout are preserved at run time.

Deployment and Hosting

outdated-update.png This article needs to be updated. Please update this article to reflect recent changes or newly available information, and remove this template when finished (SB) (4-Jan-10)

Can Morfik web applications be deployed in Linux environments?

Yes, applications created by Morfik can be deployed in Linux environments. To learn more click on Linux deployment.

What is auto-deployment and Morfik XApp Hosting?

Morfik XApp hosting is a new service that aims to simplify deployment by automating the process right out of the development environment. This service is currently in beta and only available to a limited number of Morfik developers.

Can I deploy my applications to a server running IIS?

Yes, applications created with Morfik can be deployed to an IIS web server. Please see Deploying an XApp article in Morfik Wiki for specific instructions.

Can I deploy my applications to a server running an Apache web server?

Yes, applications created with Morfik can be deployed to an Apache web server. Please see Deploying an XApp article in Morfik Wiki for specific instructions.

Installation

What are the system requirements for acceptable performance?

  • Windows XP, Windows Vista® or Windows 7®
  • Intel® Pentium™ 1.8 GHz processor or better
  • 1 GByte RAM or higher
  • 1 GByte hard disk space (Install + User Files)
  • Monitor: 1280x1024 screen resolution or higher
  • 32-bit color, 64 MB graphics memory

Do I need to have administrator rights before installing Morfik?

Yes, you will have to be logged in as administrator. This is usually the first user you’ve created on your computer.

I get an error during installation of the software. What shall I do?

It is likely that the error is caused by:

  • A prior version of Morfik running while installing Morfik
  • Another program using the Firebird database engine
  • Other software application using files that the Morfik installation is trying to update

In general the best practice is to make sure no other software is running whilst installing Morfik. In the above cases, however, it is likely that the error is not critical. Press ignore and proceed with the installation. If the program does not install properly, you can always un-install the program by using the "Add/Remove programs" applet in the "Control Panel" and then try to reinstall again. If the problem persists please contact us by email with the exact nature of the problem (mention the error code if available).

What does this message mean? "A Version of Firebird is already installed on your system. Do you want to install Morfik Firebird?"

You will see this message if a previous installation of Morfik or a stand-alone version of Firebird are detected on your system. Firebird is the database engine used by Morfik. Strictly speaking you do not need to reinstall but it is highly recommended that you do.

It is recommended to uninstall any Firebird versions that already exist on my PC before installing Morfik. Why?

The built-in database engine in Morfik is Firebird 2.0 and it is installed within the Morfik installation folder. Any version of Firebird prior to version 2.0 is not supported in Morfik and if they are installed and happen to be running, the IDE will complain.

Can I install Morfik on a network drive?

Morfik requires that project files are kept on a local hard disk. The reason is that the Morfik database server needs to have exclusive access to the project database file (.mxd) and that is not possible on shares (mapped network drives via Windows networking or Samba).

Do I need to uninstall previous versions of Morfik before installing a new version?

Morfik 2.0 installations have full compatibility with previous releases. Each version of Morfik 2.0 uses a unique installation folder (unless changed during installation). This means different installations can co-exist and even run in parallel. In contrast the project folder and the application settings folder are shared by all installations.

Database Connectivity

Does Morfik come with a built-in database server?

Morfik offers out-of-the-box support for database programming by including a high performance fully-featured relational database server. Morfik was conceived right from the start with databases in mind. Every Morfik web application has an associated database as part of the project’s structure. You can create new tables and define visual queries in Morfik without having to resort to an external tool.

What is the database server used in Morfik?

Morfik's built-in database server is Firebird relational database server. Firebird is a high performance open source relational database with significantly low memory usage and low maintenance requirements making it ideal for web-based applications. Morfik makes use of many advanced features of Firebird transparently, allowing developers to benefit from them without having to learn how to use them directly. This allows developers to quickly go from being a novice to creating sophisticated data driven applications.

Can I access external databases in a Morfik application?

Apart from the ability to import data from other databases, Morfik allows you to create applications that access multiple databases. These can be separate Firebird databases (Morfik’s built-in databases) or from different database management systems (DBMS) such as MS SQL. There is no limitation in the number and type of databases you can combine in a Morfik project, as long as the respective DBMS has an ODBC driver.

What is the database connectivity model used by Morfik?

Morfik uses Open Database Connectivity (ODBC) to connect to external database management systems (DBMS) such as Microsoft Access, Microsoft SQL Server, Oracle, MySQL, etc.

ODBC provides a much fuller implementation of ubiquitous data access because hundreds of ODBC drivers exist for a large variety of data sources. ODBC operates with a variety of operating systems and drivers exist for non-relational data such as spreadsheets, text and XML files. Because ODBC dates back to 1992, it offers connectivity to a wider variety of data sources than other data-access APIs. More drivers exist for ODBC than drivers or providers exist for newer APIs such as OLE DB, JDBC, and ADO.NET.

When I use an external database the connection is slow, is this because of ODBC?

The quality and the speed of connection depend on the particular implementation of an ODBC driver for a given database management system. Differences between drivers and driver maturity can be an important issue. Newer ODBC drivers from unknown sources do not always have the stability of drivers from known suppliers already deployed for years. Years of testing and deployment mean a driver may be better optimized and contain fewer bugs.

Does Morfik use ODBC to connect to its built-in Firebird databases?

No, Morfik connects to its built-in Firebird databases using native API.

Are you going to add native support for other databases?

Not in the foreseeable future.

Does Morfik use native API to connect to external Firebird databases?

Yes, Morfik allows you to connect to external Firebird databases using Firebird’s native API for connectivity.


Programming

How is it possible to build AJAX applications with Morfik without writing JavaScript?

Being present in all browsers JavaScript has become the native language for programming inside the browser. Created to add some interactivity to HTML pages JavaScript has far exceeded its origins. Due to its origins, JavaScript is not ideally suited for creating applications that are more complex, but it has ended up in that role, being the only alternative in the landscape.

Morfik recognized, several years ago, that the evolution of the Web and the requirements for creating the sophisticated applications of the future would grow in complexity beyond what is reasonable to expect from developers hand coding JavaScript.

Morfik's solution to this growth in complexity is our revolutionary JavaScript Synthesis Technology (JST). Using Morfik, you implement the business logic of your application using a high-level object oriented language and Morfik compiles your code into JavaScript.

What are the advantages of using Morfik versus hand-coded JavaScript?

  1. By allowing developers to program in an object oriented language, with a syntax similar to one that they have already mastered, Morfik promotes code reuse and offers a base on which to build. This improves the quality of the output, but also significantly reduces the development cost of AJAX applications.
  2. Morfik’s strongly-typed compiled languages follow a rigorous programming model that has made compilers the preferred tool for building large and complex applications.
  3. Compiled code is, by definition, more reliable and scalable than interpreted code. Although the client-side code generated by Morfik is JavaScript, rigorous type-checking and enforcement of referential integrity by the compiler produces more reliable and scalable AJAX.
  4. Programming at a higher level of abstraction than JavaScript/HTML allows the incorporation of new technologies including innovations in HTML/XHTML/DHTML, CSS and JavaScript as they become available. In this way, we can develop these advances without the developer having to do anything to leverage them.

Is there any disadvantage to using a high level language instead of JavaScript?

Under certain circumstances automatically generated code might not perform as well as optimised hand written JavaScript code. However, these circumstances are becoming very rare as JavaScript engines are getting faster and more sophisticated in their execution of JavaScript through their use of advanced optimization techniques. See Google’s V8 JavaScript Engine for an example of recent breakthroughs in the speed of execution of JavaScript code.

What is Morfik’s programming language?

Morfik supports three programming languages: Morfik Pascal, Morfik Basic and Morfik C# (Morfik C# is currently in beta and can be downloaded from the Morfik website).

Why does Morfik support multiple languages?

Morfik supports a single programming language, but that language does not have syntax of its own; only a set of semantic rules. On top of these rules, Morfik implements three syntaxes – Pascal, Basic, and C# – so that you can use the language syntax of your choice.

We want everyone to be as comfortable as possible when working with Morfik. We believe many people have shied away from web development because they can’t use their existing programming skills (not only do they need to learn new web technologies, but also new programming languages).

Can I mix different programming languages in the same project?

Yes, you can mix different languages in Morfik. For example a module written in Pascal can be used in a Morfik Basic project and vice versa.

Is the code generated by Morfik cross-browser compatible?

The generated code by Morfik has cross-browser compatibility. Applications that are created by Morfik (for example this Site) can be accessed by Firefox, IE6, IE7, Safari, Opera and Chrome browsers. There have been some issues with IE8 beta which we will fix as soon as the final version is released.

Are Browser Back/Forward, Clean URL, Bookmarking and Refresh supported in Morfik applications?

The basic implementation of these features are supported in Morfik applications without any extra work needed to be performed by the developer. However for a more advanced behaviour the built-in functionality can be overridden programmatically and that would allow developers to customize these features for the specific needs of their applications.

I'm looking at the ability to add and integrate third party JavaScript libraries into my application. Is this possible?

Morfik allows the programmer to call JavaScript functions that reside in external files or directly embed JavaScript in Morfik languages. However, these functions and embedded code will not be subject to the rigorous compiler checks that are performed on Morfik code and the developer is responsible for debugging, cross-browser compatibility and maintenance of the external and the embedded JavaScript code.

What do you use behind the scenes to generate the binary code for the application? Is it a pre-compiled generic stub?

Morfik uses the Free Pascal compiler for generating the server binary for Windows and Linux platforms. The executable is not a pre-compiled generic server/database stub. Every executable that is generated is different.

Free Pascal produces the fastest and the most compact executable compared to other server side technologies such as ASP, PHP or Java systems. This means Morfik applications are much faster in execution speed and have a much lower memory signature.

Is Morfik Framework written in Morfik?

Yes, Morfik Framework is completely written in Morfik Pascal. It is also available in Morfik Basic and Morfik C#.

Related Topics