Infra Developer Tool

All things relating to configuring, customising and developing infraEnterprise

Infra Developer Tool

Postby Simon » Fri Sep 12, 2008 5:09 pm

*** Infra Query Editor is free but requires registration to download. The tool is designed for development environments - see caveats in the forum introduction about production environments ***

Anyone reading this post is almost certainly going to have encountered frustrations while editing the Infra query file at some point. Recently, even with a "moderate" level of approximately 100 customised queries, I found that I had inadvertently entered two versions of the same query, while another couple were not being read due to incorrect layout.

I decided that there was a case for designing an Infra Developer's tool which would allow you to open, view and edit infraEnterprise Query files. The result is the attached utility.

In essence you open an Infra query file (typically infra_custom.sql but you might find a use for editing the infra_queries.sql as well) and then you right-mouse click to access the options that are available in the Parsed view of the file. The queries are laid out in tree format with the number of occurrences of the queries forming the first level of the hierarchy, then the name of the query at the next level, then the query text itself on the third. Different options will be available at each level so experiment with moving around the Tree structure and right-clicking. Obviously you'll only want one of each query so if you have any more than one instance of a query, the occurrences node will be highlighted in red and you won't be able to make further saves until the duplicate entries have been removed.

You also have the option of toggling between the tree view and the "Raw" view. An alphabetic sort is available in tree view mode so that you can run two instances of the app side by side and compare two versions of a query file.

I will add some Known Errors and suggested Enhancements below but please feel free to add to this thread with your own comments (positive or negative), functionality suggestions, bugs, quirks, etc.

Hopefully this will prove a useful tool for Infra Developers. Many thanks to those who tested the early versions and suggested improvements.

- Simon
You do not have the required permissions to view the files attached to this post.
Last edited by Simon on Fri Jul 31, 2009 11:38 am, edited 5 times in total.
Simon
 
Posts: 44
Joined: Fri Mar 07, 2008 12:27 am
Location: Surrey, England

Re: Infra Developer Tool

Postby Simon » Fri Sep 12, 2008 5:12 pm

Known Error: The current parsing algorithm does not handle blank lines in the middle of a query. I'm not sure why anyone would want to do this but in order to parse comments correctly it was decided to omit support for blank lines in the middle of queries.
Simon
 
Posts: 44
Joined: Fri Mar 07, 2008 12:27 am
Location: Surrey, England

Re: Infra Developer Tool

Postby Simon » Fri Sep 12, 2008 5:21 pm

The following Enhancements have already been logged. If you strongly agree/disagree with any of these, please post a reply.

- [Implemented in v2.1] Numbering on the queries in Tree View mode to allow for greater comparing ability between two files
- [Implemented in v2.1] Text search facility on both the Tree View and the Raw View pages would be helpful and, perhaps, also a search and replace facility
- [Implemented in v3.0] When switching from Tree View to Raw View, automatically position the cursor within the raw text at the start of the query that was highlighted in the Tree View
- Right-click options to be placed on toolbar and enabled/disabled accordingly
- Ability to open an infra_queries.sql file and an infra_custom.sql file together - all edits to the infra_queries.sql file would automatically be posted to the infra_custom.sql file
Last edited by Simon on Mon Nov 17, 2008 4:55 pm, edited 2 times in total.
Simon
 
Posts: 44
Joined: Fri Mar 07, 2008 12:27 am
Location: Surrey, England

Re: Infra Developer Tool

Postby ach » Wed Sep 24, 2008 3:18 pm

Hi

Just a quick note to say I found the tool very useful. Hopefully, as stated in your reply to JonMok, you are still all working away with infra.
When I saw you had asked for feedback & suggestions I thought I would contribute; but I see the couple of things I was thinking of have already been logged.

I definitely think a search function would be very useful - search and replace would be good too.
Numbering would be useful not only for comparison but also reference

---
Also if you could add something that would make infra fully functional with all the bells and whistles right out of the box I'd appreciate it! !
ach
 
Posts: 1
Joined: Wed Sep 24, 2008 3:00 pm

Re: Infra Developer Tool

Postby Simon » Wed Oct 29, 2008 1:30 pm

OK - There's a new version of the Infra Query File Editor available [v2.1.0.0]. It's contained in the zip file linked to the first post in this thread.

A few comments on the new functionality:

[Cosmetic]
- I've renamed the app the "Infra Query File Editor" (IQFE) as that's its actual function. It may have started off as a simple viewer but that was very early in the development.
- Icons and cursors have been standardised.

[Non-Functional]
- The performance of sorting has been greatly enhanced.
- I've ironed out a few inconsistencies in which menu items were being enabled/disabled in edit mode and in the process prevented an exception that was happening if you tried sorting while editing (??!)
- There was a minor issue around the query count incrementing when adding new queries. Fixed.

[Functional]
- Perhaps the most useful change is one that wasn't listed above but became apparent as I began to use this tool in earnest. IQFE now handles a startup parameter of a filename. This means that if you right-click on a file and choose "Open With IQFE" it will open, parse and display the file. Soooo handy. This also means that you can create icons on your desktop for specific query files.
- There is a new Menu option to display query numbers. This works in conjunction with the Alpha Sort.
- Comprehensive Find and Replace functionality is now added to the Raw File View and Find functionality to the Tree View. All these are accessed on a right-click.
- Up to 8 Most Recently Used (MRU) files are now remembered and added to the File Menu. The filenames have been stretched to allow for long paths.

I'd be interested to hear the experiences of anyone else using the tool. One thing thing has struck me is that the more I use this tool, the less I use the Raw View - everything I need is now in the Tree View. As always, I'm eager to hear enhancement suggestions for the next release.

Regards,

Simon
Simon
 
Posts: 44
Joined: Fri Mar 07, 2008 12:27 am
Location: Surrey, England

Re: Infra Developer Tool

Postby Simon » Wed Oct 29, 2008 2:21 pm

A couple of minor tweaks added to fix scrollbars disappearing from Raw View and Anchoring from Tree View.
Version 2.1.1 attached to first post.
Simon
 
Posts: 44
Joined: Fri Mar 07, 2008 12:27 am
Location: Surrey, England

Version 3.0.2

Postby Simon » Mon Nov 17, 2008 4:54 pm

OK - A new release and some nice new features:

Bugfixes
1) As mentioned above blank lines in the middle of queries were not being handled correctly. This is now resolved.
2) The new Search function was refreshing the Raw View page when you closed it. Resolved.

New features
1) A "Reload" option.
2) Double-clicking on quert in the Tree View Mode will automatically open Raw View mode and take you directly to that query.
3) An option to Auto-Expand the nodes on loading of a query file is now included along with the Numbering and Alpha-Sort options. All of these are now held underneath a TreeView menu so it is clear that they only apply to the TreeView mode.
4) The state of these options (on/off) are now stored in the registry and brought to to new sessions and applied automatically to any new files opened.
Simon
 
Posts: 44
Joined: Fri Mar 07, 2008 12:27 am
Location: Surrey, England

Version 3.0.3

Postby Simon » Fri Jan 09, 2009 11:55 pm

A minor bugfix. The "Raw View" container had a "maximum number of characters" limit set which resulted in an inability to correctly edit large sql files.
This limit has now been removed and you can happily edit sql files of any size while in "Raw View" mode. The file attached to the first post has now been updated with the most recent version (3.0.3).
Simon
 
Posts: 44
Joined: Fri Mar 07, 2008 12:27 am
Location: Surrey, England

Re: Infra Developer Tool

Postby sjawwadh » Wed Jul 22, 2009 1:53 pm

Simon,

I am trying to download the infra_query tool but it is giving me the following error.

Warning: require_once(distribution/file.php) [function.require-once]: failed to open stream: No such file or directory in /forum/includes/application.php on line 136

Fatal error: require_once() [function.require]: Failed opening required 'distribution/file.php' (include_path='') in /forum/includes/application.php on line 136

Maybe the link is outdated?

Thanks.
sjawwadh
 
Posts: 14
Joined: Wed Jan 28, 2009 9:30 pm
Location: Riyadh, Saudi Arabia

Re: Infra Developer Tool

Postby Simon » Fri Jul 31, 2009 11:39 am

Jawwad - Bug and link now resolved. Not sure what happened there but let me know if you still have problems downloading it.
Regards, Simon
Simon
 
Posts: 44
Joined: Fri Mar 07, 2008 12:27 am
Location: Surrey, England


Return to Infra Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron