Tuesday, December 21, 2010

Copy/Paste Rows in Advantage Data Architect

This is a guest post by Will Foster, our R&D intern this year, on a feature he implemented in ARC version 10.1

will@WilliamGFoster

Overview

The Advantage Data Architect (ARC) now supports copy and pasting directly from the table browser! This functionality has been added in order to allow copy and pasting into and out of ARC. This means when you select one or more records in a table view (SQL Utility in next v10.1 public update) you will now be able to right click and “Copy Records” which will place all your data, including memo and blob field types, onto the system-wide clipboard. The data is placed onto the clipboard in CSV, HTML Table, and Tab delimited formats. This means you will be able to Paste directly into Microsoft Office products with some default formatting, and directly into an HTML formatted e-mail message. This framework also allows you to select data in Microsoft Excel or other spreadsheet software and paste directly into ARC, making adding data to a table as easy as a copy and a paste. You can also copy rows from a table and paste back into that same table (to duplicate rows, then tweak individual fields, for example).

 

copypaste

Copying data directly from a table browser

paste-excel

Pasting directly to Microsoft Excel

paste-gmail

Pasting directly into email client

 

Binary/BLOB Data

It should be noted that blob field types will be 64 bit encoded prior to being placed onto the clipboard. This means that if copying large quantities of blob data, this encoding may take a while, and will remain 64-bit encoded if pasted anywhere other than ARC. However, you can feel free to copy and paste blob data within ARC, retaining all the original integrity of the field.

 

Field Mapping

You can also copy and paste from two entirely different tables. This is accomplished via a mapping dialog. This allows you to modify the orientation of fields from the source table so that they match the destination table. If any conflicts occur you will be notified and allowed to retry with all the data still remaining on the clipboard. This dialog will also let you choose if you have a header row or not (useful when copying partial bits of data from Excel or the Web. This dialog also attempts to match based on field names, so if you have fields in a different order on the source table it will be no problem at all!

 

field-mapper

Field Mapping Dialog

 

Conclusion

Overall, the copy/paste functionality is a great addition to ARC and we believe it will make your data manipulation tasks even easier than before!

Wednesday, October 6, 2010

ITC Software Alliance: Industry-Led Education

CS Extras

Our goal is to increase the number and quality of software professionals in Idaho.

Idaho’s software industry is vibrant and expanding. Yet, many are not aware of its growing importance. Today there are many silos of professionals and user groups in Idaho exposing high school students to software, teaching guest lectures at universities, and training their own employees valuable skills. These efforts are inspirational, but can often fade when volunteers don’t feel like they are making the impact originally envisioned. We would like to pool these existing resources, strengthen them with renewed interest from Industry partners in the Idaho Technology Council, and create a community that not only engages high school and university students, but its own members as well.

By helping to build a more vibrant software community through industry led training, we can help retain existing professionals, build a solid pipeline of excellent local talent coming from our Idaho schools and universities, and avoid recruiting from out of state.

The Format

Our format simply pairs Idaho software experts with those seeking enhanced skills and information about software. The format will be flexible – presentations, interactive coding sessions, round table discussions and other discussion and training methods.

Idaho’s software industry employees and leaders are encouraged to volunteer in one of these areas:

  • Encourage teens to consider and pursue a software degree
  • Increase college student’s awareness of a variety of programming skills and knowledge, and showcase exciting career opportunities.
  • Expand existing professional skills with industry-specific presentations, skills and training

Starting early 2011, we’d like to host an event every other month, with focus areas of your interest. Scheduling will be dependent on areas of interest and the best time of year for the target audience. The target audience will vary throughout the year between high school students, university students, and industry peers.

What We Ask of Volunteers

Volunteers will be asked to present (or help present with one or more additional volunteers) one time each year or two. Topics and formats can vary based on the subject matter and the target audience. Volunteers can expect support from the Software Alliance for organizing, scheduling and communicating the sessions and discussions. The Software Alliance will lay the ground work for the volunteers to effectively share their expertise.

Example topics may include:

  • Basics (source code control, debugging techniques)
  • Technologies (languages, frameworks, mobile development, content mgmt)
  • Hands on demonstrations
  • Tips and best practices

We Need Your Help

Interested? Motivated? E-mail me to volunteer or ask questions.

You can also check out Facebook page for the most up to date information.

Still not convinced?

Still reading? The content above was the “short version”, and will be the base message we market in the future and post on our web site. I’m including some of the rational behind the plan below for those interested in more context:

A Successful Partnership

Industry led software education benefits all parties involved, making it a very powerful mechanism.

Benefits to Employers
  • Develop reputations and company name recognition with potential student hires. When students are attending job fairs or looking for internship employment they will recognize companies who have invested time training them in the past. They will also likely know the instructors, and if they enjoyed those instructors they will be more likely to interview and entertain job offers with their company.
  • Help the local community build a bigger job force to hire from, and a job force that has additional skills beyond those taught as part of the student’s course work. This will reduce ramp-up time when educating out-of-college new hires.
  • Students will learn about the active tech community in Boise and many companies that employ software professionals here that they didn’t know existed, resulting in more graduates staying in Idaho and a larger talent pool for all companies to hire from.
  • As the program grows, and is promoted by ITC, employers will be helping draw out of state students to Idaho universities. This in turn can result in a larger pool of students willing to consider Idaho companies for their full time employment.

Benefits to Students
  • ITC Software Alliance seminars will provide free training above and beyond their standard course-work. This will create students with additional “real world” training and make them more marketable when they are interviewing for internships and full time positions.
  • Develop relationships with local companies, many of which will be looking to hire interns and full time employees.
  • Develop a relationship with ITC and have access to its full list of relevant companies when looking for employment.
  • Eventually we would like to have ITC scholarships we can offer students who have engaged us in these training events.

Benefits to Universities
  • Student retention in engineering programs as industry guest speakers motivate students and provide glimpse into what their “real world” working environment and tasks may entail.
  • If successful, this program will differentiate Idaho universities and make them more valuable and attractive to out of state students.
  • Industry training will allow universities to focus on core competencies of the curriculum, while industry volunteers help educate students on specialty, cutting edge topics that the industry needs new students to understand (Python, .NET, Ruby on Rails, etc) for immediate employment (whether as interns or full time employees).

Monday, September 27, 2010

Too Many Web Frameworks

This list of web frameworks is not complete (read all of the additional frameworks listed in the comments), but serves as a reminder why many traditional desktop application developers encounter analysis paralysis when moving to web development.

Wednesday, September 8, 2010

Advantage Web API

Currently, data stored in the Advantage Database Server can only be accessed via an Advantage client interface of some sort (Delphi components, .NET Data Provider, PHP driver, etc.). All of these interfaces are built on top of the Advantage Client Engine (ACE), and ACE only supports two platforms; Windows and Linux.

The easiest way to consume your data from other platforms is to expose that data via a web service. Depending on your experience and familiarity with web services, this can be a trivial task, or a pain point. There are many choices to be made at a high level (IIS, Apache, Ruby, Python, ASP.NET, PHP, etc.) and once those decisions are made there are even more at lower levels (framework decisions, REST vs RPC, etc.).

Once implemented, these technologies work well with Advantage, but have introduced a variety of moving parts that your team must now understand and maintain. In addition, the requirement for these technologies as a foundation has increased both your development time and the scope of your project. For many teams this is a manageable solution, but for others this entry barrier prevents projects from ever getting off the ground.

 

A Built-In Solution

We want Advantage users to have a turnkey option to retrieve their data via a web service. You can still obviously build your own, but for teams that would like a jump start, or would like to investigate web interfaces without the overhead or commitment, we will be distributing a pre-built web server and web service that provides access to your existing Advantage data. 

 

The Technology

The web service is implemented as an Apache module that will be loaded by a stand-alone instance of Apache. This web service can also be installed into an existing Apache installation, but by default will install it’s own minimal copy of Apache.

The web service is a RESTful API that returns data using a format very similar to the oData specification. The initial implementation will return JSON data. XML is a possibility for future implementations, but will not be part of the initial beta.

Every modern development environment I know of provides the ability to make an HTTP call and consume a web service. This means you will have access to your Advantage data from literally any programming language and on any device platform.

Configuration will be VERY simple. Add the path to the database you want to expose to a configuration file, and that’s it. You will immediately be able to securely (via HTTPS) request and update data from your Advantage server via web URI’s.

 

Consumption Examples

I’ve included a few examples below of this web service retrieving a set of records. These examples are by no means complete, but provide a quick glimpse at the consumption of this API on a variety of platforms and devices.

 

Web Browser

The easiest way to test the service is to simply enter a URI into your browser.

For example, entering the following URI into your browser after installing the server:

https://myserver:6282/adsweb/v1/test_db/tables/orders

would return:

web

 

.NET

Consumption from the .NET framework is accomplished using the built in WebClient class in combination with the JSON.NET library for JSON serialization and de-serialization:

   1: WebClient w = new WebClient();
   2:  
   3: w.Headers.Add( "Authorization", "Basic " + 
   4:    Convert.ToBase64String( Encoding.ASCII.GetBytes( "adssys:" ) ) );
   5: w.Encoding = Encoding.UTF8;
   6: string result = w.DownloadString( 
   7:    "https://myserver:6282/adsweb/v1/test_db/tables/orders" );
   8:  
   9: sr = new StringReader( result );
  10: olist = (oDataResults<Orders>)serializer.Deserialize( new JsonTextReader( sr ), 
  11:                                                       typeof( oDataResults<Orders> ) );
  12:  
  13: // Results are now ready to use in an object list
  14: if ( olist.d.results.Count > 0 )
  15:    MessageBox.Show( string.Format( "First order ID is {0}", 
  16:                     olist.d.results[0].id.ToString() ) );

 

iPhone/iPad (Objective-C)

Consumption in Objective-C is accomplished using the URLWithString constructor and the TouchJSON library:

   1: NSString *jsonString = [NSString stringWithContentsOfURL:
   2:    [NSURL URLWithString: @"https://myserver:6268/adsweb/v1/test_db/tables/orders"]
   3:           encoding: NSUTF8StringEncoding error:&error];
   4:     
   5: // deserialize
   6: NSData *jsonData = [jsonString dataUsingEncoding:NSUTF32BigEndianStringEncoding];
   7: NSDictionary *dictionary = 
   8:    [[CJSONDeserializer deserializer] deserializeAsDictionary:jsonData error:&error];
   9:     
  10: // save reference to the rows
  11: _rows = [[NSMutableArray alloc] initWithArray:[dictionary objectForKey:@"d"]];
  12: [_rows retain];

 

Android (Java)

Consumption in Java is accomplished using the WebClient class and the Gson library:

   1: WebClient ordersClient = 
   2:    new WebClient( "https://myserver:6282/adsweb/v1/test_db/tables/orders" );
   3:  
   4: String jsonOrders = ordersClient.GetData( "total>50000" )
   5:  
   6: Gson gson = new Gson();
   7:  
   8: OrdersListWrapper ordersList = gson.fromJson( jsonOrders, OrdersListWrapper.class );
   9:  
  10: // The deserialized Results are now contained in the "d" object array.
  11: if ( ordersList.d.Count > 0 ) {
  12:    TextView tvResults = (TextView)mainView.findViewById( R.id.txtResults );
  13:    tvResults.setText( "The First Order ID is " + 
  14:                       (new Integer( ordersList.d[0].id ).toString() ));
  15:    }

 

JavaScript 

The following example consumes the API using Javascript in a browser, and uses the JQuery framework to quickly manipulate the JSON data and present a table:

   1: <script language="javascript">
   2:  
   3:   $.getJSON('https://myserver:6282/adsweb/v1/test_db/tables/orders',
   4:   function(data, status){
   5:     $.each( data.d, function(i, item) {
   6:      $('#res').append( '<li>Order ' + item.OrderNo + ' : $' + item.AmountPaid + '</li>' );
   7:     } );
   8:  
   9:  });
  10: </script>
  11:  
  12: <ul>
  13:   <div id=res>
  14:   </div>
  15: </ul>

 

PHP 

The following example consumes the API using PHP, and uses the CURL extension and built in json_decode function:

   1: $session = 
   2:   curl_init("https://localhost:6282/adsweb/pupdir/v1/query/select%20*%20from%20test1");
   3:  
   4: // configure CURL to trust our server with self-signed cert
   5: curl_setopt($session, CURLOPT_SSL_VERIFYPEER, false);
   6: // set db password
   7: curl_setopt($session, CURLOPT_USERPWD, "adssys:");
   8: // setup curl_exec to return the data instead of printing it
   9: curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
  10: // set headers
  11: curl_setopt($session, CURLOPT_HTTPHEADER, 
  12:   array ( "Accept: application/json; charset=utf-8" ) );
  13:  
  14: // get the data
  15: $response = curl_exec($session);
  16: curl_close($session);
  17:  
  18: // decode the json into an object
  19: if ( ! $dataset = json_decode( $response ) )
  20:   trigger_error( json_last_error() );
  21:  
  22: // spit out a simple table (normally would use a view, but not in small example)
  23: print( "<table><tr><hr><th>Lastname</th><th>Firstname</th></tr>" );
  24: foreach ( $dataset->d->results as $row )
  25:   print( "<tr><td>$row->LASTNAME</td><td>$row->FIRSTNAME</td></tr>" );
  26: print( "</table>" );

 

Beta Testing and Discussion

The beta program is underway and we are ready for testers to try the new web API. If you would like to be included in the beta process, please register here and we will email you download and documentation links.

In addition, you can visit the Advantage.webapi newsgroup for Advantage Web API discussions and updates. If you can not access NNTP newsgroups, feel free to email me (Jeremy.Mullin at Sybase.com) with any feedback you may have.

Thursday, July 8, 2010

Advantage Version 10 Tips

If you didn’t catch Chris’ series of tips on utilizing the new functionality in Advantage version 10, he has created a post with links to all 25 tips. Great material in bite-sized chunks, and much better than sitting down and reading a help file.  :)

Thursday, April 22, 2010

Boise Software Mentoring

Last night David Cohen from TechStars presented at a local TechBoise event. He explained how TechStars helped to generate a software startup community and ecosystem in Boulder Colorado that feeds itself. Entrepreneurs, investors and mentors generating more entrepreneurs, more investors, and more mentors. It was motivational, to say the least. It was also hard to see why this couldn’t work in Boise. In fact, Nebula Shift was announced a few months ago and plans to use a similar approach.

I don’t plan on leaving my corporate job any time soon, but I’m fascinated with the software startup story. David’s presentation helped me realize my position in the community might be as a mentor. I want to contribute, and mentoring seems like the most immediate way to get involved.

At the end of this post I offer up a little information about myself, not in the context of “look at me”, but rather as a quick overview of things I’m interested in, past endeavors, and areas I might be able to contribute. Some of these things I know in depth, some I’ve only played with for a week or two, some I’d be interested in learning more about and could only provide direction to resources and research. The list is certainly not complete, but hopefully provides a quick overview.

I’m not a TechStars caliber mentor:

  • I can’t provide business advice (at least nothing credible).
  • I’ve never started a company.
  • I’ve never made millions.

I do love writing software, talking about software, and using software.

I can provide architecture and framework suggestions, beta feedback, and general “have you heard of”, or “have you considered” types of conversations. I can help you locate and evaluate contractors. I can review and test the code contractors deliver as well as give you an independent assessment of the reality of their schedules. I can even write a few modules for you on a weekend every now and then.

My day job working on developer tools exposes me to an outrageous number of technologies. My communication skills make it easy for me to effectively discuss these technologies with people of varying technical backgrounds. Some of the most helpful mentoring I have done so far has been helping those with little to no technical background get a handle on what is necessary, and what to expect, when implementing their business ideas.

I hope a few colleagues will join me, and perhaps we can start a mentors directory on the TechBoise web site. Until a directory like that exists, feel free to email me directly.

J.D. Mullin, jeremy.d.mullin@gmail.com, @jdmullin

 

What I Currently Do

  • Software developer and R&D manager for an embedded database server and its client APIs and drivers
  • Develop and write server and desktop client software using a variety of platforms and languages
  • Understand of a wide variety of database technologies, development environments and programming frameworks
  • Manage feature prioritization and roadmap
  • Handle scheduling and dev team (they are awesome and low maintenance, though, so this job is easy)
  • Train and interact with other software developers (we mostly sell to ISV’s)
  • Constantly evaluating development environments and frameworks is part of my job. Provides a breadth of knowledge, but not always much depth
  • Ship a successful software product that was conceived and is still currently developed here in Boise
  • Read way too many software blogs

General Interests

  • RESTful services
  • Scalability
  • Concurrent programming
  • Web APIs
  • Post-mortem debugging
  • Mobile device development (synchronization, data access, etc.)
  • Social graphs
  • Big dogs, beer, camping, motorcycles

Past

  • My resume is probably the best list of past work

Thursday, February 25, 2010

Advantage v10 Delphi SQL Property Editor

One of my favorite new features in Advantage version 10 (beta at the end of March) is the new TAdsQuery.SQL property editor in Delphi/C++Builder. No longer will users be greeted with the default Delphi string list editor:

 

boring

 

Instead, you will see the familiar SQL Utility from the Advantage Data Architect:

 

qeditor

 

What does this mean? Now, without leaving your work flow in Delphi/C++Builder, you will have:

  • syntax highlighting
  • code templates
  • access to the query plan
  • ability to create indexes to help optimize the query
  • ability to export the query results
  • find and replace functionality
  • ability to run and preview query results
  • ability to verify query syntax
  • ability to debug SQL scripts

Write your query, preview it, and debug it. Then just click OK and the query is saved to your TAdsQuery instance. It’s all ball bearings these days.

Another cool feature is this is the exact same interface you use inside the Advantage Data Architect (ARC), no need to learn any new functionality, it will all be familiar.

To preview some of the other upcoming features in Advantage version 10 be sure to register for Chris’s upcoming webinars.

Wednesday, January 20, 2010

Object-Relational Mapping (ORM) Technology

Sharing an interesting post by Shawn Wildermuth, Are ORM’s Solving Anything. Be sure to read the comments as well for more insight from his readers.

I’m also fond of our colleague Glenn Paulley’s recent presentation, “ORMs: Friend or Foe?”, which can be found and downloaded from his presentations page.

I’ve written my own “poor man’s ORM” solutions in the past to facilitate object generation from a database result set, but have yet to fully embrace the latest generation of ORM technology. Like many developers, I’m a control freak and I love my database. Putting a middle man and smoke and mirrors between us is not fun for me. However, reducing the need to crank out endless lines of redundant data access code certainly is appealing. For writing simple applications, I really like the idea of using an ORM to just “get the job done”.

I wish the Advantage team had the resources to support all of the ORM’s currently available, but that just isn’t possible. I could name at least 7 off the top of my head, and I bet with 5 minutes of web searching I could easily find another 10.

I’m also concerned about the long term maintenance requirements. Supporting ORMs is not as basic as providing an interface to our database. We then have to deal with optimizing overly complex queries generated by the ORM (see Glenn’s presentation), record locking and visibility issues, transaction issues, etc.

For now we support the .NET Entity Framework. Hibernate and NHibernate are on our radar, but no decisions have been made yet to move forward with solutions for those frameworks. There are feature requests for both on our feedback page. I’d encourage you to vote for those or submit your own requests. Also please feel free to comment on this post to share your insights or thoughts.