RackForms v7.8.8
rackforms blog
Site Tag Line
Latest Release: Build 958 - Arpil 18th, 2023
Contact Us  Purchase Options Purchase Options Contact Us
header-image


 

Welcome To The RackForms Blog.

You come across a lot of cool ideas and trends when developing software, here's where we like to share them!

 

Archive Navigation:

 

Just Released: Build 863

Oddly enough I start another blog entry by saying it's been an exact number of months since the last update -- this time 2 : )

Of course we've been busy, and this update in particular will be of interest to our more advanced users. Specifically, we've made an important change to the way hidden fields behave. See all the details in this quick video.

We've got some other goodies as well, the biggest being we can now enable persistent logins under form security. It used to be that the automatic form login system would only validate a single login for a single form. This was great for simple cases, but limiting when we wanted to use one login for multiple forms. This new feature enables this, making secure form validation that much easier in RackForms!

 

Just Released: Build 861

It's been exactly one month since our last blog update, and in that time we've now released two updates! Build 860, released on 8/27, was highlighted by the incredible new jQuery file uploader. This new module allows for single or multi-file uploads without the use of flash, working beautifully across all device types.

Our second update has just been released, its major features being support for PayPal's Payflow checkout API, and dynamic destinations for flat file items. Dynamic destinations are a fantastic way to build single-source folders for an entire jobs upload content -- a great help for complex flat-file workflows.

We're incredibly excited to get these great new features out the door, so head on over to the downloads page now and get updating!

 

Coming In Build 860

Just a quick update on our progress towards the next release. The big feature for 860 is a brand new upload method that supports multiple files and most importantly, is not Flash based. While we already have a multi-file solution, it's reliance on Flash puts it on shaky ground. The new method is JavaScript based, and degrades gracefully to s standard file upload field when JS is not available.

Build 860 should be released in early September, so keep on eye on the downloads site!

 

Build 858 Released

We're proud to announce the immediate availability of Build 598 (5.9.8). This is a maintenance release, with specific attention paid to minor UI fixes and enhancements. We've also updated our Google Docs integration suite to be compatible with OAuth 2, which means if you use Google Docs integration with your forms this is a must-have update!

If you haven't already done so, please head on over to the downloads site and grab your copy now!

 

Build 852 Released

Just a quick heads up that Build 853 (5.9.1) has just been released. This is mostly a small feature and and patch update, with one notable exception: Huge Form Mode.

Huge Form Mode is made for forms that have hundreds of elements, and is mainly a set of optimizations that will be made standard in RackForms 6. Not wanting users to wait until then, this feature has been added as an option, which we can find under the Toolbox as:

Huge Form Mode

The performance gains from using this option are, well, huge, hence the feature's name. Users can expect an operation that used to take 2 seconds to only take a tenth of a second. Of course when we say huge forms I truly do mean it, on the order of more than 500 elements. Most normal sized forms (5 pages, 200 elements) already run without a hitch, but this feature is a huge boon to large forms!

Finally, I should note wehave a few other goodies in this release. For example, SQL+ items now have a Code After Query option, making application logic much cleaner, as well as a new page export mode, PHP Head Code & Include On Every Page Of This Job. This is a very handy feature for when we want to include a block of code on all pages of a job, such as with login credential checking.

If you haven't already done so, please head on over to the downloads site and grab your copy now!

 

RackForms Running On HHVM

February 22nd Update: RackForms can now be safely and fully installed to HHVM using the PDO driver using Build 847 or newer.

I've been a long-time fan of Facebooks wonderful commitment to the PHP platform, and none more so than with the open-source tech they release to improve PHP's performance. One particularly fruitful area has been with Hip Hop and now, HHVM. I decided it would be a worthwhile task to see if RackForms ran under HHVM, so here's how it went (a hint: really well!)

Initial Setup

The initial setup process is very simple. The HHVM documentation on Github is top notch, and in just a few minutes a fresh Ubuntu install had nginx and HHVM up and running.

Virtual Host

As RackForms is licensed to domain names, I needed to setup nginx to serve my default 'dev' domain. This was accomplished with a simple addition of a symlinked file in:

/etc/nginx/sites-available/dev

To:

/etc/nginx/sites-enabled/dev

The contents of the file are simply setting up a virtual machine to listen on port 80 for a server named dev:

server {
    listen 80;

    root /home/parallels/Documents/htdocs/rackforms;
    index index.html index.htm index.php;

    client_max_body_size 20M;

    # Make site accessible from http://localhost/
    server_name dev;
    include hhvm.conf;

    location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ =404;
            # Uncomment to enable naxsi on this location
            # include /etc/nginx/naxsi.rules
    }
}

Finally, I updated my /etc/hosts file to add an entry for 127.0.0.1 -> dev.

php.ini Changes

Next we'll update the php ini file, located at: /etc/hhvm/php.ini

Specifically, I added date.timezone, and set output_buffering to On.

; php options
session.save_handler = files
session.save_path = /var/lib/php5
session.gc_maxlifetime = 1440

date.timezone = America/Chicago
output_buffering = On

; hhvm specific
hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.mysql.typed_results = false

I then committed these changes by issuing a restart to nginx:

sudo service nginx restart

Code Updates

Next up was the actual RackForms codebase. I started by monitoring the HHMV error log file, which defaults to:

tail -f /var/log/hhvm/error.log

The RackForms install process was flawless, demonstrating this was already a better experience than the older Hip Hop environment. I should note that I needed to update permissions (providing write access) on my config files and output folder, as it standard procedure for a RackForms install. I also selected MySQLi as my database driver (important shortly).

I loaded the editor and attempted to save a job, and was met with an immidiate crash. A quick check of the error log shows:

Notice: Array to string conversion in [...]/rackforms/app/classes/Database.php on line 2135
Core dumped: Segmentation fault

Nicely enough, the error log also points us to a trace file:

/tmp/stacktrace.1228.log

The trace shows a wealth of data, including the PHP source that caused the error:

Host: ubuntu
ProcessID: 1348
ThreadID: 7fa77bfff700
ThreadPID: 3214
Name: unknown program
Type: Segmentation fault
Runtime: hhvm
Version: tags/HHVM-3.5.0-0-ga90f4733cfa0d8fefdafc7433f758f78cdc75424
DebuggerCount: 0

ThreadType: Web Request
Server_SERVER_NAME: dev
Server: dev
URL: /app/lib/save_xml.php

# 0  HPHP::Variant::assign(HPHP::Variant const&) at /usr/bin/hhvm:0
# 1  HPHP::MySQLStmt::fetch() at /usr/bin/hhvm:0
# 2  HPHP::c_mysqli_stmt_ni_fetch(HPHP::ObjectData*) at ext_mysqli.cpp:0
# 3  void HPHP::Native::callFunc(HPHP::Func const*, void*, HPHP::TypedValue*, HPHP::TypedValue&) at /usr/bin/hhvm:0
# 4  HPHP::TypedValue* HPHP::Native::methodWrapper(HPHP::ActRec*) at /usr/bin/hhvm:0
# 5  HPHP::jit::x64::BackEnd::enterTCHelper(unsigned char*, HPHP::jit::TReqInfo&) at /usr/bin/hhvm:0
# 6  HPHP::jit::MCGenerator::enterTC(unsigned char*, void*) at /usr/bin/hhvm:0
# 7  HPHP::ExecutionContext::invokeFunc(HPHP::TypedValue*, HPHP::Func const*, HPHP::Variant const&, HPHP::ObjectData*, HPHP::Class*, HPHP::VarEnv*, HPHP::StringData*, HPHP::ExecutionContext::InvokeFlags) at /usr/bin/hhv$
# 8  HPHP::ExecutionContext::invokeUnit(HPHP::TypedValue*, HPHP::Unit const*) at /usr/bin/hhvm:0
# 9  HPHP::invoke_file(HPHP::String const&, bool, char const*) at builtin-functions.cpp:0
# 10 HPHP::include_impl_invoke(HPHP::String const&, bool, char const*) at /usr/bin/hhvm:0
# 11 HPHP::hphp_invoke(HPHP::ExecutionContext*, std::basic_string, std::allocator > const&, bool, HPHP::Array const&, HPHP::VRefParamValue const&, std::basic_string, HPHP::FastCGITransportTraits>::doJob(std::shared_ptr) at /usr/bin/hhvm:0
# 15 HPHP::JobQueueWorker, HPHP::Server*, true, false, HPHP::JobQueueDropVMStack>::start() at /usr/bin/hhvm:0
# 16 HPHP::AsyncFuncImpl::ThreadFunc(void*) at /usr/bin/hhvm:0
# 17 HPHP::start_routine_wrapper(void*) at /usr/bin/hhvm:0
# 18 start_thread at /build/buildd/eglibc-2.19/nptl/pthread_create.c:312
# 19 clone at /build/buildd/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:113

PHP Stacktrace:

#0  mysqli_stmt->fetch() called at [/home/parallels/Documents/htdocs/rackforms/app/classes/Database.php:2135]
#1  Database::pdo_procedure_params(SELECT job_name FROM fb_jobs WHERE job_name = ?, Array, 0) called at [/home/parallels/Documents/htdocs/rackforms/app/lib/save_xml.php:162]

The PHP error shows the cause is at Database.php:2135, and a quick Google of the code at that line: hhvm $stmt->fetch(), provided instant results with this link, which linked to this guy. Long story short: we're out of luck for now on the MySQLi front.

Luckily, RackForms also sully supports using the PDO extension, which I switched to by opening the app/config.php file and changing this line:

define('DB_TYPE', 'mysql'); // mysql = PDO :: mysqli = MySQLi :: mssql = SQL Server

With this change the error vanishes and we're up and running. I'm now going through and making small changes as the error log suggests, which so far as been very minimal.

RackForms Performance

Of course the big win here, at least in theory, is performance. Both from a memory utilization and speed perspective HHVM should be about twice as efficient.

Although by no means exhaustive, my finding so far is indeed, HHVM is twice as fast as stock PHP. For example, the save_xml.php part of the job build process is always twice as fast. If it takes 11 milliseconds on default PHP, it takes 5 on HHVM. Even more impressive this is when comparing a native server (stock PHP) vs. HHVM running on a Virtual Machine.

Other parts of the build process are a bit more of a wash, simply becuase we're IO bound rather than code execution. Generally speaking though, the exirience of using HHVM with RackForms is, in a word, snapy.

Generic Performance

I also downloaded a sample benchmark script and gave it a run on the same machine under stock PHP and HHVM. Such benchmarks are usually quite meaningless, but they do help us visualize raw data crunching performance. For example, we could have a script dedicated to processing images.

Benchmark

Conclusion

The good news is RackForms, when Build 848 is released later this week, will be fully certified to run under PDO in HHVM. Even better, RackForms now also natively supports installing under PostgreSQL, which means RackForms now runs faster, in more places than ever before!

 

Build 843 - 845 Tour

As we roll into February I'm excite to announce the imminent release or Build 845, a massive collection of fantastic new features and time savers. Watch the video tour now to see what's new!

 

New Responsive Web Form Features!

Just finished up a fantastic new set of features for responsive design, a quick video tour is in order: enjoy!

 

Happy New Year!

As we all settle into the new year, I personally cannot wait to get started building the next set of features and improvements. As mentioned in the previous post, the first big new feature for this year will be our new visual query builder. But that's not all: the other big task is a "grand simplification" for the RackForms UI.

Over the years RackForms has gained an incredibly diverse and rich set of features and tools. But this diversity comes at a price: many tasks in RackForms aren't, to me at least, as easy or fast as they should be. This is where the grand simplification comes in. The task is simple: take the most common operations and features and make them easier to find and use.

For example, right now, to make a field required we select the field, then press control R or check a box in the validation options area. Simple enough, but if I then want to change the text color of the field I have to scroll up a small amount. This scrolling should not be necessary. The simplification will be to group such common options together, greatly reducing UI navigation.

In addition to making RackForms faster to use, it will also become much easier to learn. A win win on both counts.

Of course I want to hear from you as well. If you have any ideas please let us know.

 

So many features, So little time