Current Filter:
Category: Extensions
Date Range: Last 7 days containing posts.
(clear filters)

Sunday, June 1, 2008

Happy National Regex Day - 5 Tips for working with Regular Expressions

Happy National Regex Day!

To celebrate I'd like to share some tips for working with Regular Expressions that have helped me over the years I've been using them. I've got 5 tips to share today (#1 is already in the post on Ben Nadel's blog that I linked to but thought it worthwhile to repeat here, sorry if it is a dupe for you...)

Tip #1, for Dreamweaver Users: If you're a Dreamweaver user and need to build a regular expression, start learning about the Server Behavior Builder. When you create a server behavior, Dreamweaver generates a regular expression to match the code block(s). If you're in a hurry (or especially if you're just learning regular expressions), the regexes Dreamweaver generates can be a good starting point. You'll find the regexes it generates are in your user's Configuration in .edml files (which are XML files).

Tip #2, for CFEclipse users (assuming this works in other flavors of Eclipse as well): When you use the Search dialog (ctrl+H on the Mac), there's the obvious Regular Expression checkbox. With your focus in the Containing Text field, press Ctrl+Space to get a handy regex cheat sheet.

Tip #3, a Workflow Tip: When trying to come up with that perfect regex, take the time to build a static page or two that has what you want to match in it. Essentially, create a use case document. Then use your favorite regex capable Find and Replace tool to work up to creating the perfect regex. For instance, if you have a huge string to match, start by trying to match only the first 5 characters then add on to your regex and test again. When you've got it matching your use cases, then go ahead and plug it into your ColdFusion or JavaScript code (you don't use other code right? ;-))

Tip #4, Debugging Regular Expressions: You'll most likely find yourself debugging a regex at some point or another, and for me its usually because I missed a use case. (That's when its time to update the use case document.) Any time I've got a regex that isn't quite working right, I trim it back. In other words, I do the opposite of what I described in the first part of my workflow tip above. Stop trying to match what you really want to match in its entirety, take a bit away from the regex at a time until it starts matching your use case file. (If you didn't make a use case file, now is the time to do it!) Then build that regex back up again little by little until you have it matching everything you want.

Tip #5, Application Comments: In the case of using a regex in an application (versus in Find and Replace), always, always make a comment on what that regex means in plain English terms and why you need to use it in the first place. Sooner or later, someone will look at the regex and quite possibly have their eyes glaze over -- it could be you! So do yourself and others a favor and take a couple minutes to comment it. If you're extra geeky you'll have your comment refer to your use case file so they can actually see exactly what the heck that fancy string of characters is supposed to match.

Posted by ~Angela | Comments (3) | Add Comment | Permalink

 
Saturday, October 22, 2005

I'm on TV!

First print ads, now I'm on TV! Ok, so it isn't regular TV, it's SYS-CON.TV but its still TV...

On Tuesday (October 18, 2005) at about 5:45pm I was interviewed by SYS-CON.TV's Jeremy Geelan, live and unscripted. The interview was recorded at MAX 2005 right there in SYS-CON's booth. The interview appears to be completely unedited*, lasting a bit over 5 minutes.

*The interview is a bit of a blur, I was so tired at the time. To the best of my memory, everything recorded is being played.

I think the camera added a good 10lbs., I say "um" and "uh" a whole lot, and my grammar could have been better if I'd thought a bit more before answering, but otherwise it was pretty good for me. (I'm probably my worst critic...) Once you watch the interview, feel free to leave a comment here on my blog to let me know what you thought.

Posted by ~Angela | Comments (4) | Add Comment | Permalink

 
Sunday, July 24, 2005

Cartweaver 2 PHP now available!

You asked for it, now you can get it; Cartweaver 2 PHP is now available. (If you didn't ask for it, we'll still let you buy it don't worry.)

As you can probably tell, we're quite excited to have a new product to offer. PHP is a very popular server model and many people have contacted Cartweaver support to inquire about a PHP version of our popular shopping cart software.

The ASP, ColdFusion and PHP versions all look the same online. To make it easier for developers who code in multiple server models, we kept all three versions as similar as possible structurally.

As for the Dreamweaver extensions, between all versions everything is identical with the exception of a few minor differences in the installation and setup due to server model requirements.

Special thanks to Tom Muck, our PHP developer for all of his hard work. You've done an incredible job Tom!

Posted by ~Angela | Comments (2) | Add Comment | Permalink

 
Tuesday, March 22, 2005

Due out soon - Macromedia ColdFusion MX 7 Web Application Construction Kit

Due out soon, is Macromedia ColdFusion MX 7 Web Application Construction Kit by Ben Forta and Ray Camden with Leon Chalnick and Angela C. Buraglia (that's me!). I only wrote chapter 2, which is an overview of Dreamweaver geared towards ColdFusion developers. (The new ColdFusion MX 7 extensions for Dreamweaver are covered in other chapters, not the one I wrote.)

Ben will be posting the table of contents on his site. I do have the back cover copy from the book that I can share:

MacromediaŽ ColdFusionŽ MX 7 Web application construction kit

The ColdFusion MX 7 Web Application Construction Kit is the latest edition of the best-selling ColdFusion book of all time-the one that most ColdFusion developers used to first learn the product.

This reference starts with ColdFusion fundamentals, then progresses to techniques for all the most critical functions, including creating data-driven pages, building complete applications, implementing security mechanisms, integration with email, building reusable functions and components, generating data driven reports and graphs, interacting with Macromedia Flash, and much more. From design and installation, to application deployment and troubleshooting, this book is all you need to succeed with ColdFusion MX 7.

New ColdFusion MX 7 features and options covered in this edition include:

* Using Dreamweaver MX 2004 extensions to simplify application development

* Creating printable documents in PDF and FlashPaper formats

* Leveraging ColdFusion's new reporting tool

* Generating engaging Flash forms

* Harnessing the power of XForms and XSL

* And much, much more


CD-ROM includes:

* Developer edition of ColdFusion MX 7

* Evaluation version of Dreamweaver MX 2004

* Ten bonus chapters on more advanced ColdFusion topics

* All source code and example applications

Posted by ~Angela | Comments (2) | Add Comment | Permalink

 
Friday, March 18, 2005

A must-read blog post by Tom Muck

I just got done reading a post by Tom Muck about rogue extensions for Dreamweaver. Though his post is geared towards Dreamweaver, it is important to note that the same issues exist for other Macromedia programs such as Flash and Fireworks which also rely on the Extension Manager to install/uninstall extensions. Tom's post is a must-read for anyone using any Macromedia product that uses the Extension Manager to install extensions.

A rogue extension can come from any extension developer, including reputable companies. There are no regulations in place to prevent extensions from the problems described in Tom's post.

For the average user it is not easy to determine if the extensions offered by any particular person or business are safe to install without worry that their configuration will be corrupted. At this point, the average user is left to trial and error...

Rest assured that any extension that I've written and will write will never "overwrite" a Macromedia default file. If it means that I can't release the extension without modifying one of Macromedia's files, oh well. I'd rather know that I haven't caused the frustration of even a single extension user than be selfish and write my extensions without regard to repercussions.

I feel it is important to spread the word about the potential for problems. Tom's points are all very valid concerns. At the same time, I hesitate to write on this topic because it could easily be seen as trying to bash a potential competitor or further my own business.

On the other hand, if I say nothing at all, then what? The potential for conflicting extensions becoming a common problem is definitely there in my opinion. I can't just sit back knowing this and say absolutely nothing about it.

This post alone possibly risks causing certain companies/people to become upset with me for speaking out about it. I sure hope it doesn't ruffle any feathers because my intentions are good, but I guess that's a chance I'm taking...

I doubt it is Tom's intention, and it certainly is not my intention to scare people into avoiding extensions. If you run into a problem, removing\renaming your User's Configuration should restore things normal. Worst case scenario, you'll have to reinstall.

Posted by ~Angela | Comments (0) | Add Comment | Permalink

 
Monday, March 14, 2005

I'll be there, will you? - The 2nd Annual March Mingle

It's almost time for the 2nd Annual March Mingle to be held this Wednesday, March 16th at Dave N Busters in San Diego, California. There's no cost to attend, with free pool and finger foods. Just bring a few bucks for drinks.

There will be about 20 user groups represented this year from all over Southern California, who's focus range from web design, to Macromedia products, to operating systems, and programming languages. ColdFusion, .Net, PHP and general geeks alike (that's a compliment) will gather to eat, drink, shoot pool, socialize and network from 6:30pm to 10pm.

Oh, and you don't have to be a user group memeber to attend either. So even if you're not a user group member, you should come and shoot some pool, meet some people, and possibly win some very cool door prizes.

For the Dreamweaver users attending, Site-Drive Inc. (DWfaq.com) is donating a bundle of all DWfaq.com Dreamweaver extensions and Application Dynamics Inc. (Cartweaver.com) is donating a license of Cartweaver as door prizes.

There will even be some not-necessarily-just-for-geeks prizes, a very cool Cuetec Black Graphite Cue and a poker chip set courtesy of FiveStarBilliards.com. There will be more door prizes from Macromedia, The O'Reilly User Group Program, Sterling Ledet and Associates, and That Technical Bookstore too. With as many prizes as there are to be given away, there's a pretty good chance of winning something.

Posted by ~Angela | Comments (0) | Add Comment | Permalink

 
Sunday, November 21, 2004

Dan just thinks he's done...

We've been working on Cartweaver ASP for what seemed like an eternity, and now it is finally available. Dan posted on his blog that he's finally done. Ha, he's too funny. There will be customers to support, add-ons to create and who knows what else... The way I see it, we're never "done". <grin />

Writing a single toolbar to manage multiple Cartweaver server models was no easy task let me tell you. (It's ok if you give me a blank stare, nearly everyone else does when I start talking about coding extensions.) I laid the groundwork for multiple versions from day one, but there were things that I couldn't have accounted for that needed adjusting when the time came to actually support multiple server models.

As it turned out, the ASP version required several more fields in its Setup, so that brought along a whole new interface for the Setup that is similar to the Preferences dialog in Dreamweaver. Then "feature creep" set in and I started adding other new features to the extension. Before we knew it I'd added context help icons for nearly every field in each dialog that pop up a little window that tells you what the field is for and its valid values.

I added a bunch more little features here and there that most people would take for granted. I won't bore you with all of them, but one of them is that if you make a mistake in a certain field, the error message tells you which field, then switches to the right category for you and puts focus in that field so you can make the correction right away.

If you read my post yesterday you know all about DWfaq CCR. Cartweaver ASP uses DWfaq CCR's syntax for conditional regions already because Dan has been using CCR nearly 2 years now. So it was decided among the Cartweaver Team that it would be cool if Cartweaver ASP could render the tabbed regions like you see when using <cfif> in ColdFusion.

So we decided to go ahead and add an ultra-lite version of the CCR translator, of DWfaq's CCR for Cartweaver since I already had the work done. Cartweaver ASP customers will see "CWASP: If" in the tab, but if DWfaq's CCR is installed the If statement itself renders in the tab.

You're still reading this? Wow, that's great...thank you. Anyway, I don't want to bore you so I'll quit while I'm ahead. <wink />

I'm sure I'll end up babbling about Cartweaver here again soon. Thanks for listening...

Posted by ~Angela | Comments (0) | Add Comment | Permalink