tag:blogger.com,1999:blog-77695378829463878192023-11-15T07:09:29.842-06:00Cory Wilesthealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.comBlogger43125tag:blogger.com,1999:blog-7769537882946387819.post-73571884347638939152010-01-25T11:08:00.001-06:002010-01-25T11:08:12.027-06:00Test Me
<div class='posterous_autopost'>This is only a test <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://blog.corywiles.com/test-me-3">Cory Wiles Blog</a> </p> </div> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-18219747263519845602010-01-22T16:42:00.001-06:002010-01-22T16:42:37.825-06:00Test
<div class='posterous_autopost'>Test post <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://eraseurx.posterous.com/test-65712">Breakups From Erase Ur X</a> </p> </div> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-20342383915933989202010-01-13T16:48:00.001-06:002010-01-13T16:48:11.804-06:00The Drive to Build More
<div class='posterous_autopost'>Based upon the <a href="http://twitter.com/kwylez" target="_blank">myriad of tweets</a> over the past three months or so, most who follow me know that I have been working on my first <a href="http://www.eraseurx.com/"><b>iPhone app</b></a>. Well, first to submitted to the app store. I have finished an app for work and have started on another for <a href="http://www.feedfootball.com">www.feedfootball.com</a>. Though the app hasn't hit the stores YET, I already have the inspiration to build more. <a href="http://www.eraseurx.com">EraseUrX</a> has by far been the most rewarding <a href="http://www.corywiles.com/portfolio">project</a> I have worked on in the past three years. Even if I don't make a lot of money, it truly has been self satisfying to just complete this project. I can't wait to get started on the next one not only for the challenges that await, but also I know that I be able to put it in the App Store faster.<p /> There has been a lot of <a href="http://mashable.com/2009/11/23/schiller-app-store-policies/" target="_blank">criticism of Apple's approval process</a> in the <b>App Store</b>, but over the past three months they have made <a href="http://mashable.com/2009/12/11/app-store-redesign/" target="_blank">great strides</a> to <a href="http://mashable.com/2009/11/11/app-store-dev-updates/" target="_blank">improve</a> this process and it has benefited developers greatly. In addition, there are rumors floating around of a possible upcoming announcement of the <a href="http://www.appleinsider.com/articles/10/01/04/apple_media_event_reportedly_scheduled_for_wed__jan_27.html" target="_blank">4.0SDK</a> and a <a href="http://www.appleinsider.com/articles/10/01/12/apples_next_gen_dual_core_iphone_could_debut_in_april_report.html" target="_blank">new phone device</a>, which if the 3.0 release is any indication of the amount new features added to the phone, then the 4.0 release will give developers even more tools to increase the usability and features in our apps.<p /> Hopefully, the saying is true...<p />If you build it they will come. <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://blog.corywiles.com/the-drive-to-build-more">Cory Wiles Blog</a> </p> </div> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-11232161225892440992010-01-04T15:28:00.001-06:002010-01-04T15:28:29.875-06:002010: Location, Location, Location
I guess you could really argue that the "<i>mobile revolution</i>" was started when Apple first released the iPhone, but 2010, I predict, will be a year full of explosive new mobile technologies and adoption. 2009 saw a huge spike in the adoption of smart phones, as well as, the release of new platforms, devices, and applications. For the past 10 years I have focused on desktop web apps, but am <b>VERY</b> excited about the breakthroughs and innovation that has evolved in the mobile arena, especially with the offerings coming from <a href="http://www.engadget.com/2010/01/02/exclusive-google-nexus-one-hands-on-video-and-first-impressio/">Google</a> and of course Apple. As a consequence, 80% of my focus will be on mobile applications, both native and web.<p /> 2008 was the year of "web 2.0", 2009 was consumed by social media, and I predict that 2010 will be a digital Magellan on steroids with the Location Based Services popping up everywhere. Evidence of this is already presenting itself, with the purchase of <a href="http://www.geoapi.com/">GeoAPI</a> from <a href="http://www.twitter.com/">Twitter</a>, Google is offering <a href="http://googleblog.blogspot.com/2009/10/announcing-google-maps-navigation-for.html">"turn-by-turn" directions for free</a> in the <a href="http://developer.android.com/sdk/android-2.0.1.html">latest Android SDK</a>, and Apple <a href="http://blogs.computerworld.com/14835/apple_purchased_mapping_company_in_july_to_replace_google">purchased a map tile software company</a>. The question will be how will all this data and the services used to manage the data be best served for the consumer. The days of showing pins on a map are growing quite old. It is time for more forward thinking, which is what the before mentioned companies do best. <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://blog.corywiles.com/2010-location-location-location">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-73462715488703755202009-11-19T14:00:00.001-06:002009-11-19T14:00:34.085-06:00The Need for Mobile Optimization
This is definitely a <b>NEED</b> not a want.<p />Being in a profession of constant change I am always reading someone's blog, tutorial or latest trends in various subsets of the web. Most of the time I just fire up <a href="http://www.google.com/reader" target="_blank">Google Reader</a> and start reading. However, over the past 6 months I have found myself using my <a href="http://itunes.apple.com/app/mobilerss-free-google-reader/id333925239?mt=8">iPhone as my "reader"</a> of choice. Partly because of the convenience factor and in addition, I don't have to carry my laptop around everywhere I go. Outside of Google Reader one of the best sources that I have for great articles are from some of the big names in <b>web development</b> that I <a href="http://www.twitter.com/kwylez/developers">follow on Twitter</a>.<p /> However, the sites and articles that people are linking to are still optimized for a standard browser, not the mobile experience which is <b>HIGHLY</b> annoying. It is not that I am too lazy to wait for the page to load, but the lack of patience that I have for the delay in the page to finish loading due to 30+ stylesheets requested, some ad tracking pixel or any number of other tasks that are processing that have <b>ZERO</b> to do with what I, the user, is trying to accomplish. What I find myself doing more and more is using the mobile app functionality of<a href="mailto:kwylez@gmail.com"> emailing the link</a> to <a href="http://www.corywiles.com/">myself</a> so that I can read it when I do get back to my laptop.<p /> Should this mean that companies should have a regular/mobile site? There is no right or wrong answer for that. You have to do research and look at your <a href="http://www.google.com/analytics">visitor trends</a> and who your target audience is. I would venture to say that if you are a news organization then the answer would be yes. However, even though currently you might have a low percentage of mobile visitors that number will only increase over time and your site should at the bare minimum be optimized for a mobile browsing experience. <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://blog.corywiles.com/the-need-for-mobile-optimization">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-63451221322152363082009-10-30T16:52:00.001-05:002009-10-30T16:52:55.545-05:00AVAudioRecorder prepareToRecord Silent Error
I was working on the voice record feature for one of my upcoming <b>iPhone apps</b>, but when I would try to start recording the app would crash. During the adventure of debugging I couldn't trace anything back to my code as far as memory leaks, uninitialized properties, missing delegate methods, etc. After about an hour I think I almost as many NSLog entries as I did code. The <b>two biggest</b> troubling aspects where:<br /> <ol><li><a href="http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVAudioRecorder_ClassReference/Reference/Reference.html#//apple_ref/occ/instm/AVAudioRecorder/prepareToRecord">prepareToRecord</a> was the method that was failing</li> <li><a href="http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVAudioRecorder_ClassReference/Reference/Reference.html#//apple_ref/occ/instm/AVAudioRecorder/initWithURL:settings:error:">AVAudioRecorder initialization</a> wasn't throwing any errors</li> </ol>I turned to <a href="http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder/1011273#1011273">some sample code</a> that I knew worked, but mine would still fail. At this point I knew it was going to be something little that I was overlooking. After reading through a few posts on <a href="http://www.stackoverflow.com">StackOverFlow</a> I noticed a difference in my audio configuration settings that was being passed to: <a href="http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVAudioRecorder_ClassReference/Reference/Reference.html#//apple_ref/occ/instm/AVAudioRecorder/initWithURL:settings:error:">initWithURL:settings:error:</a><p /> I have a separate class where I set the settings argument. The last two setting items are for: <b>AVLinearPCMIsBigEndianKey</b> and <b>AVLinearPCMIsFloatKey</b>. Their values need to be NSNumbers so I was using <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html#//apple_ref/occ/clm/NSNumber/numberWithBool:">[NSNumber numberWithBool:]</a>, but instead of passing in "YES" or "NO" I was passing in <i>TRUE</i> and <i>FALSE</i>, which is <b>INCORRECT</b>. Just one of those oversights I forget about when switching from one language to another.<p /> I am still not sure why my <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/Reference/Reference.html">NSError</a> wasn't populated with some information. I don't know why the initializer didn't catch my syntax error either.<p /> After I made my corrections, the recording worked <b>perfectly</b>. Whew! Now I just need to write the playback portion. <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://blog.corywiles.com/avaudiorecorder-preparetorecord-silent-error">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-27325775872966242482009-10-26T20:37:00.001-05:002009-10-26T20:37:08.038-05:00Zend Framework Dynamic Site - In Production
Back in April I wrote a <a href="http://corywiles.blogspot.com/2009/04/zend-framework-dynamic-site.html" target="_blank">blog post</a> discussing my concept of having a <b>dynamic site</b> using the <a href="http://framework.zend.com/" target="_blank">Zend Framework</a>. In addition, I posted an <a href="http://static.corywiles.com/examples/cory-wiles-dynamic-site.zip" target="_blank">some example code</a> of how everything works. I am a firm believer that one should practice what they preach and <a href="http://ccss.stjude.org/" target="_blank">two</a> <a href="http://ltfu.stjude.org/" target="_blank">different</a> sites are now in <b>production</b> using the framework that I wrote and so far it works beautifully. I had to make a few changes to the route to allow for module exceptions.<p /> Towards the end of the project there was a request to have a search functionality and also custom forms. Normally this wouldn't be an issue what so ever, but the way that the custom route is setup all requests are send to the default module/index controller/index action. I modified the route to ignore any request that started with search or forms and route those requests to the search or forms module. The regex is easily modified to allow for other exceptions.<p /> Custom Regex:<br /> <route>^(?!\bsearch|forms\b)(\w+-?[\w-?]*\/?)(.*)?</route><p />I also setup the ability to add in meta keywords and meta description tags in the content.xml file. Finally, both sites use the <b>EXACT</b> same doc root and dynamic site framework. Since both sites use the same layouts, just different menus and different background images, I didn't want to duplicate a lot of code. So in the setup page display plugin I am able to transverse the content mapping file based upon not only the request, but the url host name to display the proper layout. <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://blog.corywiles.com/zend-framework-dynamic-site-in-production">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-80300953743317602182009-10-08T07:29:00.001-05:002009-10-08T07:29:37.890-05:00SlideView Contribution
One of my favorite <a href="http://www.delicious.com/kwylez/iphone">iPhone related sites</a> to read is <a href="http://iphonedevelopertips.com/">iPhone Developer Tips</a>. The <b>tutorials</b> are <b>outstanding</b> and most importantly "<i>real world</i>" useful. Back in August there was a <a href="http://iphonedevelopertips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html">blog posted</a> showing how to implement a "slideable" message that can be presented to a user. After reading through it I decided to modify how it was used to make it a little more extensible for an <b>iPhone project</b> that I am working. After I got everything working correctly and they way I wanted to I decided to <a href="http://iphonedevelopertips.com/contact">contact the site owner</a>, John, with all of my source code in case he wanted to use it.<p /> After a little more tweaking to my code he posted my changes, as well as another developer, <a href="http://iphonedevcode.blogspot.com/">Greg</a>'s code in a <a href="http://iphonedevelopertips.com/user-interface/sliding-views-on-and-off-screen-reader-contributions.html">new post</a>.<p /> This is a small example of the importance of <b>using open source software</b>, as well as, the importance for developers to use the knowledge and skills of other developers to make the good....<b>GREAT</b>.<p /> <a href="http://iphonedevelopertips.com/user-interface/sliding-views-on-and-off-screen-reader-contributions.html">Sliding Views On and Off Screen – Part 2 – Reader Contributions</a> <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://blog.corywiles.com/slideview-contribution">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-63585981041535307302009-09-28T21:08:00.001-05:002009-09-28T21:08:59.154-05:00Best Practices That Work
Tonight I got an email from a friend that my site was down. Sometimes, if Apache has been running for a long time on my vhost then for some reason the process id gets corrupted. I don't know if that has to do with the VPS or what. I never had that problem when I had my dedicated server. It happens so infrequently I rarely even notice. However, my usual task of <b>just restarting Apache</b> didn't work. I got an error message that the main site's docroot didn't exist. That was very strange and very disturbing. I got on the phone with the sysadmins at my hosting company and couldn't really find the culprit and they didn't have the automated backup of the site.<p /> The good news, as I was told, was that they could recreate the directory structure within one minute and get Apache up and running. SWEET! However, what about my site?! Though they offer backups for the VPS they are not guaranteed.<p /> I was not panicking because I keep all site changes backed up in <b>subversion</b> on a completed different host. Once the directory structure was put back in place all I had to do was check the latest copy of my site and I was backup and running. It was good to see and know that <b>using best practices does ACTUALLY work</b>. Imagine that. <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://blog.corywiles.com/best-practices-that-work">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-38671148655445774002009-09-22T14:16:00.001-05:002009-09-22T14:16:54.889-05:00Using NSNotificationCenter with UINavigation Controllers
When presenting an app to user with a large list of information, most developers will add in the ability to search the list inside of the table view. To further increase usability it is a good practice to include different filters. For example, a scope button that allows the user to filter by name, address, phone number, etc. Implementing these features is pretty straight forward. However, one of the filter options that was needed for a particular app that I am working on was to filter by department.<p /> The complexity to this problem came in the fact that the search term couldn't be the department name, but the code. Obviously, most users don't know the corresponding codes for a given department. So I needed a way to present a list of "friendly" department names to the user to pick from, and once a given department was chosen then the corresponding department code would be populate the search bar field.<p /> The first attempt was to use a <a href="http://developer.apple.com/iPhone/library/documentation/UIKit/Reference/UIPickerView_Class/Reference/UIPickerView.html">UIPickerView</a>. Unfortunately, this wasn't the best solution mainly because you can't use key/value pairs with the UIPickerView. Well...not in a very straight forward manner. My second solution attempt was to use a <a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalViewController">modalViewController</a> and then pass the selected object back to the parent controller. Everything worked out just fine, but the parent object property wasn't being updated.<p /> To solve this problem there are a couple of schools of thought.<br /><ol><li>Set the parent controller as the delegate and setup a new protocol that the child controller implements.</li><li>Use the <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/Reference/Reference.html">NSNotificationCenter</a> which uses the <a href="http://en.wikipedia.org/wiki/Observer_pattern">Observer Pattern</a> to update another object based upon some action/method.<br /> </li></ol>Most of the time I would say that the second option is overkill since it is designed for a one-to-many object broadcasts, but in this use case it is the preferred approach because "<i>you would otherwise have to pass instances around of delegates just to connect objects</i>". - <a href="http://alexvollmer.com/index.php/2009/06/24/cocoas-ways-of-talking/">http://alexvollmer.com/index.php/2009/06/24/cocoas-ways-of-talking/</a><p /> FINAL SOLUTION:<br />// Parent UIViewControlller<p /><span style="font-family: courier new,monospace;">- (void)viewWillAppear:(BOOL)animated {</span><p /> <span style="font-family: courier new,monospace;"> [[NSNotificationCenter defaultCenter] addObserver:self</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> selector:@selector(refreshSearchBarControllerWithDepartmentCode:)</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"> name:@"DepartmentCodeNotification"</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> object:nil];</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> [super viewWillAppear:animated];</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;">}</span><p /><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">- (void) refreshSearchBarControllerWithDepartmentCode:(NSNotification *)notification {</span><p /> <span style="font-family: courier new,monospace;"> NSString *key;</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> NSString *trimmedSearchString;</span><p /> <span style="font-family: courier new,monospace;"> for (key in [notification userInfo]) {</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> trimmedSearchString = [[[notification userInfo] valueForKey:key] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> self.searchDisplayController.searchBar.text = trimmedSearchString;</span><p /> <span style="font-family: courier new,monospace;"> [self.searchDisplayController.searchBar becomeFirstResponder];</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> [self.searchDisplayController.searchResultsTableView reloadData];</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;">}</span><p /><span style="font-family: courier new,monospace;">- (void)searchBar:(UISearchBar *)searchBar selectedScopeButtonIndexDidChange:(NSInteger)selectedScope {</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"><br /></span><span style="font-family: courier new,monospace;"> if (selectedScope == DEPARTMENT_SCOPE_TITLE_INDEX && [[self.searchDisplayController.searchBar text] length] <= 2) {</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> DepartmentsViewController *dvController = [[DepartmentsViewController alloc] initWithNibName:@"DepartmentsView" bundle:[NSBundle mainBundle]];</span><p /> <span style="font-family: courier new,monospace;"> [self presentModalViewController:dvController animated:YES];</span><p /> <span style="font-family: courier new,monospace;"> [dvController release];</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"> } else if ([[self.searchDisplayController.searchBar text] length] >= 2) {</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"> NSString *trimmedSearchString = [[self.searchDisplayController.searchBar text] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];</span><p /> <span style="font-family: courier new,monospace;"> [self getEmployees:trimmedSearchString method:[[self.searchDisplayController.searchBar scopeButtonTitles] objectAtIndex:selectedScope]];</span><p /> <span style="font-family: courier new,monospace;"> [self.searchDisplayController.searchResultsTableView reloadData];</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">}</span><p /> <span style="font-family: courier new,monospace;">//Child UIViewController</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {</span><p /> <span style="font-family: courier new,monospace;"> NSString *code = [self.tableView cellForRowAtIndexPath:indexPath].detailTextLabel.text;</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"> NSString *description = [self.tableView cellForRowAtIndexPath:indexPath].textLabel.text;</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"> NSDictionary *searchDepartmentCode = [NSDictionary dictionaryWithObjectsAndKeys: code, description, nil];</span><p /> <span style="font-family: courier new,monospace;"> [[NSNotificationCenter defaultCenter] postNotificationName:@"DepartmentCodeNotification"</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;"> object:nil</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;"> userInfo:searchDepartmentCode];</span><p /> <span style="font-family: courier new,monospace;"> [self dismissModalViewControllerAnimated:YES];</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">}</span><p /> END RESULT:<br />After a user selects the appropriate department, the child controller is dismissed and the search bar text is updated with appropriate department code. <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://blog.corywiles.com/using-nsnotificationcenter-with-uinavigation">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-8983333468320346532009-09-10T10:18:00.001-05:002009-09-10T10:18:49.220-05:00Microsoft and Enhanced Experience
<a href='http://posterous.com/getfile/files.posterous.com/corywiles/9aTvVrfDWKDqlIxlvUsHbXHwgqzXLF9uV0QpnYSjB3aJtIKBmFSsLX7jkgl0/microsoft-website.jpg'><img src="http://posterous.com/getfile/files.posterous.com/corywiles/gNihyAN02P35DaB798Ljdam2VDvyAOU0YRCMpDQ2t1wrx1QSv8LYPcOxiRYZ/microsoft-website.jpg.scaled.500.jpg" width="500" height="375"/></a> <p>I read a <a href="http://www.webdesignerdepot.com/2009/05/apple-vs-microsoft-a-website-usability-study/" target="_blank">very interesting article</a> yesterday that ranked the usability between <a href="http://www.apple.com/" target="_blank">Apple's website</a> and <a href="http://www.microsoft.com/" target="_blank">Microsoft's website</a>. Granted, I am a little biased toward Apple, but I do feel that the author did a great job in their comparison. <i>*spoiler: Apple won</i>. To add to the critique the Microsoft website does something that is a <b>HUGE</b> pet peeve of mine.<p /> If a company claims to be in the "web" business then they need to create websites that look the same in all browsers. Microsoft has a <b>HORRIBLE</b> <b>reputation</b> on releasing browsers that are <a href="http://www.webdevout.net/browser-support-summary" target="_blank">not standards compliant</a>, but are constantly giving non-IE users who visit their websites a second rate experience. Case in point...<a href="http://www.microsoft.com/" target="_blank">their own website</a>. If you go their website with anything other than Internet Explorer, the visitor is presented with this <b>ANNOYING</b> alert in the upper left hand corner that is asks if you want to "<i>Upgrade your Internet experience</i>". After few seconds it does minimize, but if you don't click the "Don't show me this <b>EVER</b> again link" the next page you navigate to will show it.<p /> The fact is that I do want to upgrade my internet experience, but not by installing Silverlight, or IE7 or IE8 for that matter. All of the before mentioned pieces of software are horrible, lack innovation, and do nothing but dumb down the web. I want to upgrade my internet experience by not being harassed by Microsoft.<br /></p> <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://corywiles.posterous.com/microsoft-and-enhanced-experience">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-24161769710116384002009-09-08T16:18:00.001-05:002009-09-08T16:18:00.208-05:00Automate Adding Twitter Followers with Zend Framework
Adding followers to a user one at a time is sometimes a VERY lengthy process. Last night the question was posed to me if there was a way to automate adding followers from users who follow someone else.<p />Example scenario:<br /> John Doe follows Jane Doe<br />John Doe wants to follow at 600 followers of Jane Doe<p />Unfortunately, the <a href="http://framework.zend.com/manual/en/zend.service.twitter.html">Zend_Service_Twitter</a> class doesn't offer any functionality to retrieve a list of followers from another user, but I was able to extend the class and add the functionality.<p /> The particular user that I chose to test has roughly 6,000 users. My client didn't want all 6,000, but the first 200. Within 10 minutes the <b>new custom class</b> was written, the script ran, and now my client was now following 200 new people of like mind. :)<p /> I plan on submitting the feature request to the <a href="http://framwork.zend.com/">Zend Framework</a> gurus to have the ability to find followers from other users so that it can be apart of the main service.<p />Until then here is the class and script:<p /> <span style="color: rgb(0, 0, 153); font-family: courier new,monospace;">require_once 'Zend/Service/Twitter.php';</span><p /> <span style="color: rgb(0, 0, 153); font-family: courier new,monospace;">class CW_Twitter extends Zend_Service_Twitter {</span><p /> <span style="color: rgb(0, 0, 153); font-family: courier new,monospace;"> public function __construct($username, $password) {</span><br style="color: rgb(0, 0, 153); font-family: courier new,monospace;" /><span style="color: rgb(0, 0, 153); font-family: courier new,monospace;"> parent::__construct($username, $password);</span><br style="color: rgb(0, 0, 153); font-family: courier new,monospace;" /> <span style="color: rgb(0, 0, 153); font-family: courier new,monospace;"> }</span><p /> <span style="color: rgb(0, 0, 153); font-family: courier new,monospace;"> public function getOtherUserFriends($name) {</span><br style="color: rgb(0, 0, 153); font-family: courier new,monospace;" /><span style="color: rgb(0, 0, 153); font-family: courier new,monospace;"> $this->_init();</span><br style="color: rgb(0, 0, 153); font-family: courier new,monospace;" /> <span style="color: rgb(0, 0, 153); font-family: courier new,monospace;"> $path = '/followers/ids/' . $name . '.json';</span><br style="color: rgb(0, 0, 153); font-family: courier new,monospace;" /><span style="color: rgb(0, 0, 153); font-family: courier new,monospace;"> $response = $this->restGet($path);</span><br style="color: rgb(0, 0, 153); font-family: courier new,monospace;" /> <span style="color: rgb(0, 0, 153); font-family: courier new,monospace;"> return $response->getBody();</span><br style="color: rgb(0, 0, 153); font-family: courier new,monospace;" /><span style="color: rgb(0, 0, 153); font-family: courier new,monospace;"> }</span><p /> <span style="color: rgb(0, 0, 153); font-family: courier new,monospace;">}</span><p /> <span style="color: rgb(51, 0, 51); font-family: courier new,monospace;">$twitter = new CW_Twitter('username', 'password');</span><br style="color: rgb(51, 0, 51); font-family: courier new,monospace;" /><span style="color: rgb(51, 0, 51); font-family: courier new,monospace;">$response = $twitter->getOtherUserFriends('friendusername');</span><p /> <span style="color: rgb(51, 0, 51); font-family: courier new,monospace;">$arrayObject = new ArrayObject(Zend_Json::decode($response));</span><br style="color: rgb(51, 0, 51); font-family: courier new,monospace;" /> <span style="color: rgb(51, 0, 51); font-family: courier new,monospace;">$limitIterator = new LimitIterator($arrayObject->getIterator(), 0, 200);</span><p /><span style="color: rgb(51, 0, 51); font-family: courier new,monospace;"> foreach ($limitIterator as $value):</span><br style="color: rgb(51, 0, 51); font-family: courier new,monospace;" /> <span style="color: rgb(51, 0, 51); font-family: courier new,monospace;"> $twitter->friendship->create($limitIterator->current());</span><br style="color: rgb(51, 0, 51); font-family: courier new,monospace;" /> <span style="color: rgb(51, 0, 51); font-family: courier new,monospace;"> endforeach;</span> <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://corywiles.posterous.com/automate-adding-twitter-followers-with-zend-f">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-71086272416117104102009-08-27T22:32:00.001-05:002009-08-27T22:32:03.396-05:00Google Interview - Could You Pass?
The gold standard of programmer interview questions. It is not what they ask, but how they ask them.<p /><a href="http://courses.csail.mit.edu/iap/interview/materials.php">http://courses.csail.mit.edu/iap/interview/materials.php</a> <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://corywiles.posterous.com/google-interview-could-you-pass">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-90078783981650209362009-08-21T13:34:00.001-05:002009-08-21T13:34:07.876-05:00Migrating to HTML5 and CSS3
It seems that in the past six months there has been more and more news, examples, and <a href="http://www.css3.info/is-css-3-over-baked/">excitement</a> concerning <b>HTML5</b> and <b>CSS3</b>. I must say that I too have been <a href="http://www.delicious.com/kwylez/html5">bitten by the bug</a>. What features that I have seen makes me very excited about the future of web development. It is time to get back to basics and standards. However, because both are their infancy as far as adoption, not all <a href="http://www.webmonkey.com/blog/HTML_5_Support_by_Browser:_Opera_Continues_to_Lead_the_Pack">browsers support</a> the new technologies and the ones that do support them don't support all the features of HTML5 and/or CSS3.<p /> Being, what most people consider, an earlier adopter I am going to be converting <a href="http://www.corywiles.com">www.corywiles.com</a> over to <a href="http://www.fame-designs.com/wordpress/?p=24">HTML5 layout using CSS3</a>. In order to not shut out those of you who don't have a supported browser, I will keep the old layout around until the percentage of those browsers falls below 5%. <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://corywiles.posterous.com/migrating-to-html5-and-css3">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-91791972419133776912009-07-31T15:06:00.001-05:002009-07-31T15:06:17.051-05:00It's Not Easy to Get Mobile
Over the past two months I have been approached to develop at least three different iPhone apps. Two out of three clients weren't as shocked with the price as they were with the time line. While each developer out there has a different level of expertise, I would say that your average iPhone app will take 2 - 3 months of <b>FULLTIME</b> development and then at least <a href="http://arstechnica.com/apple/news/2008/11/app-store-lessons-expect-delays-after-approval.ars">7 days for Apple to approve it</a>. Let me reiterate that the previously estimated time frame is not only a conservative estimate, but also based up a fairly simple app.<p /> To define fairly simple, let's say that you want to have an app where you can search a database for a list of people based upon different criteria: name, age, state and country, have those displayed in a list where a user can then select one of the search results, view the person's complete detail information, and have the ability to copy that user's information to the phone's contacts. Not that complicated as far as the requirements go.<p /> However, once you start writing the app you will realize that as a developer you need to consider the asynchronous loading of the data, connection speed (Wifi, 3G, Edge or none at all), caching, processor limitations, memory limitations, phone orientation and interruptions of the app. For example, what if a call comes in while your user is trying to perform a save operation in the application or how should the app perform if there is a memory warning and/or crashes). You have to keep those, and more, in mind just when you want to display a simple list of data.<p /> Finally, after you have all your functionality worked out and you think that you are bug free the <b>REAL</b> fun begins. The software that is used to develop for the iPhone and Macs has profiling and testing features. At this point, the developer starts <i>really</i> digging into the bits and bytes of the app to make sure that it is not suffering from memory leaks, releasing objects too early/too late, and overall performance. While the phone itself is <b>VERY</b> powerful, it is still a mobile device with limitations.<p /> iPhone applications, in my development experience, are not usually offered as a standalone product or service, but as a companion to an existing or large product and/or service. As a consequence, I have seen many applications rushed out the door on time for what was an unrealistic deadline. The is usually driven by release date of the "big brother" to the application, which was set to meet a profit projection. However, if the natural mobile development time is not taken into consideration then the app doesn't reach it's full potential. At this point everyone loses.<p /> If you <a href="http://www.corywiles.com/contact/">decide that you want an iPhone app</a>, and one that works, plan it taking sometime to develop. Manage the expectations. <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://corywiles.posterous.com/its-not-easy-to-get-mobile">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-85841401662138050282009-07-19T21:54:00.002-05:002009-07-20T09:38:31.700-05:00Speeding Up the SiteI have decided that since I don't have too much time in the next three months to update a lot of the UI for this site then I will be spending my time making it load faster, especially on the main page. This first bottleneck that I noticed was when the feeds at the bottom of the page where being de-cached, the entire page was not being loaded until they were done. This has been rectified by having those load separately through AJAX calls after the page has finished loading.<br/><br />
<br />
The next area of improvements will be the <a href="http://www.corywiles.com/portfolio">portfolio gallery</a>.<br/><br />
<br />
It is all about getting to where you have to go faster and more efficient.<br/><br />
<br />
<div style="font-size: 10px;"><a href="http://posterous.com/">Posted via email</a> from <a href="http://corywiles.posterous.com/speeding-up-the-site">Cory Wiles Blog</a> </div>thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-44389643315697157672009-07-16T08:19:00.001-05:002009-07-16T08:19:25.597-05:00Posterous Is Keeping It Simple
Leveraging social media <a href="http://www.doshdosh.com/list-of-social-media-news-websites/">outlet's to promote your site</a> can be a love/hate relationship. While the power of promotion is undeniable within the <b>social networking</b> outlets to spread the gospel of whatever <a href="http://www.corywiles.com/services/">business or service</a> you are offering, it can be a daunting task to note only keep up with the number of sites out there, but also maintaing them. You are seeing more and more companies having to extend their marketing or PR departments to include employees whose day to day tasks are to post and moderate these sites.<br /> <br />One of the statements that I hear most often from clients is that they want to have a presence on <a href="http://www.facebook.com/">Facebook</a>, <a href="http://www.twitter.com/">Twitter</a>, <a href="http://www.youtube.com/">YouTube</a>, <a href="http://www.linkedin.com/">LinkedIn</a>, etc., as well as <a href="http://corywiles.blogspot.com/">blog</a>, but they don't want to have to update twenty different sites. The best solution by far for this is to use <a href="http://www.posterous.com/">Posterous</a>.<br /> <br /><b>Posterous</b> is by far the <b>EASIEST</b> service for not only, <b>blogging</b>, but also blasting out updates to individual services or groups of services at <b>once</b>. Just send an email to <a href="mailto:post@posterous.com">post@posterous.com</a> and you have an <a href="http://corywiles.posterous.com/">instant blog</a>. You don't even have to <a href="http://posterous.com/main/register">create an account</a> first, but if want to have access to some of their other services then an account is required. If you want to attach a <b>video</b> to blog or <b>images</b>...no problem. Just attach them to the email and embedded videos are added to the blog post as well as, images and audio files.<br /> <br />While some people require more advance features from a blog or need to have better control of their design, then there are plenty of <a href="http://asymptomatic.net/blogbreakdown.htm">great choices for them to choose from</a>. However, I have found that most people don't have the time to do anything other than email. Well your white horse has arrived.<br /> <br />Just send an <a href="mailto:post@posterous.com">email</a>. It doesn't get much simpler than that.<br /><br />::NOTE:: This blog was posted using <a href="http://www.posterous.com/"><b>Posterous</b></a>. <p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a> from <a href="http://corywiles.posterous.com/posterous-is-keeping-it-simple">Cory Wiles Blog</a> </p> thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-55767505436421571572009-06-08T22:59:00.000-05:002009-06-08T22:59:26.197-05:00WWDC Day OneWhile I can't disclose all that I learned from the <a href="http://www.apple.com/wwdc">WWDC</a>, due to the NDA, I will say that it has been amazing. Apple has not only put on a well oiled conference, but the <a href="http://www.apple.com/macbookpro/">new product lines</a> as well as tools and resources available have just been amazing.<br />
<br />
In case you didn't catch today's keynote here are some highlights:<br />
<br />
<ul><li>Macbook Pros now come in 13in, 15in, 17in models</li>
<li>Macbook Pros can have up to 8gb of RAM</li>
<li>Macbook Pros have SD Slot</li>
<li>Snow Leopard has an almost seamless connection to <a href="http://www.apple.com/macosx/exchange.html">Exchange</a></li>
<li>Snow Leopard and iPhone SDK use 90% of the same framework/APIs</li>
<li>Prices have dropped tremendously</li>
<li>iPhone 3g are now only $99</li>
<li><a href="http://www.apple.com/iphone/">iPhone 3gp[s]</a> are coming in 16gig/32gig</li>
<li>iPhone 3.0 now supports voice dialing, improved camera (with autofocus and highlighting), video camera with in-context editing and digital compass.</li>
</ul><div>Obviously there was much more discussed so to get all the juicy details check out the <a href="http://www.apple.com/quicktime/qtv/keynote/">keynote video</a>. </div><div><br />
</div>thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0San Francisco, CA, USA37.775196 -122.41920437.7073535 -122.5359335 37.8430385 -122.30247449999999tag:blogger.com,1999:blog-7769537882946387819.post-69468784742293130032009-06-05T10:01:00.000-05:002009-06-05T10:01:19.276-05:00WWDC Next Week in San FranciscoThe party will begin in roughly three days. I am one of the lucky individuals who is attending the <a href="http://developer.apple.com/wwdc/">2009 WWDC</a> in San Fransisco. With all the <a href="http://www.appleinsider.com/categories/iPhone.html">rumors</a> flying around the web right now it is definitely hard to discern fact from fiction, but I have been working diligently on my first iPhone application using the <a href="http://developer.apple.com/wwdc/iphone/">3.0Beta_3 SDK</a> and while I can't speak specifically about a lot of the <a href="http://developer.apple.com/wwdc/iphone/#smule">new features</a>, because of the NDA, I can say that Apple once again has kept the users in mind with the new features. All will be pleased.<br />
<br />
Everyone from developers to the casual user.<br />
<br />
For up-to-date information on the conference just <a href="http://www.twitter.com/kwylez">follow me on Twitter</a>.thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0Memphis, TN, USA35.142852 -90.0523534.862109 -90.519269000000008 35.423595 -89.585431tag:blogger.com,1999:blog-7769537882946387819.post-50767123780689569882009-05-01T14:49:00.000-05:002009-05-01T14:49:43.817-05:00New Site Launched - Erin WilesNew site has been published - <a href="http://www.erinwiles.com/">www.erinwiles.com</a>thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-30595159586604803072009-04-22T08:32:00.002-05:002009-05-13T21:42:45.444-05:00Targeting Nested LI's with jQueryAfter two days of trying every DOM hierarchy transversile that I could think of or learn from I was about to give up. The task at hand was fairly simple. I was creating a <a href="http://draft.blogger.com/goog_1240407040450">TreeView</a><a href="http://bassistance.de/jquery-plugins/jquery-plugin-treeview/"> menu</a> for a given directory. The top level nodes where generated when the page loads and if the top level "resource" is a directory then when that item is clicked an AJAX call is made to get it's sub-resources which are nested ul/li.<br /><br />In order to make subsequent calls for any directories/files that are > the first level I need to get the id of the li tag that is clicked (only directories have the ability to be clicked).<br /><br />I thought I would be able to navigate through the DOM hiearchy to the nested li and retrieve the id, however, this becomes a problem with nested ul/li's because if you try to alert the id and expect the result to be of the nested element you will get the id of the parent element.<br /><br /><b>List Items</b><br /><code><br /></code><br /><ul id="topLevelDirectoryFiles"><li class="toggle" id="applications">[+]applications<br /><br /><br /><ul class="open" id="applications-child"><li class="toggle" id="applications-lib">lib</li><li id="applications-index.php">index.php</li><li class="toggle" id="applications-settings">settings</li><li id="applications-.htaccess">.htaccess</li><li class="toggle" id="applications-images">images</li><li class="toggle" id="applications-css">css</li><li class="toggle" id="applications-views">views</li><li class="toggle" id="applications-js">js</li><li class="toggle" id="applications-modules">modules</li><li class="toggle" id="applications-layouts">layouts</li></ul></li><li class="toggle" id="ops">[+]ops</li></ul><br />// doesn't work<br /><code><br />$(document).ready(function() {<br /><br /> $("li").click(function() {<br /> alert($(this).attr('id'));<br /></code><br /><code> })<br />});</code><br /><br />// does work<br /><code>$(document).ready(function() {<br /><br /> $("li").click(function(event) {<br /> alert(event.target.id);<br /></code><br /><code> })<br />});</code><br /><br />The solution was to pass and event object to the click event handler. After I figured out that little nugget it only took me another hour to finish up my script.thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-67245367127162594612009-04-05T21:39:00.005-05:002009-04-09T15:51:37.631-05:00Zend Framework Dynamic Site<b>::UPDATE - 04.09.2009::</b><br />
I finally was able to <a href="http://static.corywiles.com/examples/cory-wiles-dynamic-site.zip">create an example</a> of the below described site. If you have any questions/comments please <a href="mailto:corydwiles@gmail.com">let me know</a>.<br />
<br />
When creating a website, especially in the corporate/enterprise world, it assumed that you have to use some sort of <a href="http://en.wikipedia.org/wiki/Content_management_system">content management system</a>. The range, and subsequent debate, could be everything from free (<a href="http://www.joomla.org/">Joomla</a>, <a href="http://www.wordpress.org/">Wordpress</a>, <a href="http://www.drupal.org/">Drupal</a>) to the very expensive (<a href="http://www.vignette.com/">Vignette</a>). While I am in a firm believer in the use of a CMS it seems lately I have been asked to develop sites whose content doesn't change that often, but the responsibility still needs to fall into the hands of a content editor not a developer. In addition, <a href="http://www.scottwills.co.uk/">the designer</a> that I work with wanted the freedom of creating as many templates as he wanted and tweak the design without having to consult me, the developer, nor have to work with a content editor to update any of the content pages.<br />
<br />
I went back and forth how to best solve this solution. While Joomla and Wordpress would have certainly handled all of these requirements there is the overhead that comes with any CMS and with the requirements that I had to work with I kept asking myself if using a CMS was lighting a grill with an atom bomb.<br />
<br />
The end result was a hybrid between using static "html" and a mini-CMS....all using the <a href="http://framework.zend.com/">Zend Framework</a>. I came up with a way that separated the content, layouts, and the developer maintained backedend of the site.<br />
<br />
Basic requirements:<br />
<ol><li>SEF's</li>
<li>Breadcrumb subheadings</li>
<li>Flexible layouts - some pages might need a "one column content well", "one column content well with a side bar", etc</li>
<li>Content pages should be kept in one location</li>
<li>Templates should be independent of backend code and content</li>
</ol><b>Directory Structure:</b><br />
<ul><li>content</li>
<li>css</li>
<li>images</li>
<li>index.php</li>
<li>js</li>
<li>layouts</li>
<li>lib</li>
<li>modules</li>
<li>settings</li>
</ul><b>How It Works</b><br />
<ul><li>Creating/Editing Content<br />
<br />
<br />
<ol><li>Create the static phtml file in the content directory</li>
<li>Edit the content.xml file in the content directory and add the following attributes and/or nodes: url - 1) what the request url will be. 2) file - the name of the phtml file (minus the extension). 3) pageTitle - self explainatory 4) layout - what template do you want to use for the page<br />
</li>
</ol></li>
<li>Page Rendering<br />
<br />
<br />
<ol><li>Zend Layout</li>
<li>Zend MVC</li>
<li>Custom regex route <br />
</li>
<li>Custom Site Page Render Plugin</li>
</ol></li>
</ul><br />
<b>Plugin and Go</b><br />
<br />
The majority of the site dynamics happens in the custom plugin - routeShutdown method.<br />
<ol><li>Based upon the $_SERVER['REQUEST_URI'] the appropriate "page" node is located: "//pages/page[@url='{$_SERVER['REQUEST_URI']}']".</li>
<li>The page title is set</li>
<li>The name of the view (phtml) file is set</li>
<li>The breadcrumbs array is populated. *</li>
<li>All the attributes are then set as an array of params and set in the request.</li>
<li> The IndexController/indexAction grabs the params, sets them to view properties to be displayed in the layout<br />
</li>
</ol><br />
*::NOTE::<br />
Since there is technically not a hierarchy of files on the web server... the way that the url is decided upon is by the content editors. Because of this there is a business rule in place that the "toplevel" navigation is the first set of characters in the url and child navigation thus follows. In the method the breadcrumbs are created by parsing this pattern. <br />
<br />
<b>Conclusion</b><br />
While there is definite room for improvement to how the site management is done we have seen great efficiency not only how the site is maintained and content is created, but also the amount of code that is used to generate the site.<br />
<ul><li>1 module, 1 controller, 1 action, 1 custom plugin</li>
<li>developers, content editors, and designers are able to work on their respective portions of the site without having to rework or update any other aspect of the site in 99% of use cases.</li>
</ul><br />
I finally was able to <a href="http://static.corywiles.com/examples/cory-wiles-dynamic-site.zip">create an example</a> of the below described site. If you have any questions/comments please <a href="mailto:corydwiles@gmail.com">let me know</a>.thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com3Memphis, TN 38105, USA35.1516237 -90.034986635.1340792 -90.0641691 35.1691682 -90.005804099999992tag:blogger.com,1999:blog-7769537882946387819.post-8028448346614872009-02-24T16:35:00.000-06:002009-02-24T16:35:16.443-06:00Uh OhI realized yesterday that my site has been throwing an error for the past few days. The reason being was that the RSS feed url for Smashing Magazine had changed. I updated the footer feed display and now everything is all better.thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0tag:blogger.com,1999:blog-7769537882946387819.post-46149641140006012692009-02-15T21:36:00.001-06:002009-02-16T10:08:54.537-06:00Internalization and Zend FormOne of the many growing requirements that I am experiencing at work is for internalization of our forms. In this particular use case the languages available are limited to English and Spanish so I am not able to use Zend_Locale::BROWSER exclusively. To make sure that correct form displays, in my form model class I created an array of allowed locales. Before the form instantiated in the controller the language param is set the registry, and then that locale is checked against allowed locales.<br />
<br />
References:<br />
<ul><li> <a href="http://framework.zend.com/manual/en/zend.locale.html">Zend_Locale</a></li>
<li><a href="http://framework.zend.com/manual/en/zend.translate.html">Zend_Translate</a> </li>
</ul>Translations - located in my models directory: Models/Languages/En.php and Es.php<br />
<br />
// En.php<br />
<code><br />
return array(<br />
'name' => 'First Name',</code><br />
<code> 'address' => 'Address'</code><br />
<code> );<br />
</code><br />
<br />
// Es.php<br />
<code><br />
return array (</code><br />
<code> 'name' => 'nombre', 'address' => 'dirección'<br />
<br />
);<br />
</code><br />
<br />
<code><br />
// Controller snippet<br />
/**<br />
* Add language to the registry<br />
*/<br />
$locale = new Zend_Locale($this->_getParam('lang'));<br />
Zend_Registry::set('locale', $locale);<br />
<br />
// Form snippet<br />
/**<br />
* Instance of Zend_Locale<br />
*<br />
* @var Zend_Locale<br />
*/<br />
protected $_locale = null;<br />
<br />
/**<br />
* Allowed locale regions<br />
*<br />
* @var array<br />
*/<br />
protected $_allowedLocales = array('en', 'es');<br />
<br />
protected $_translations = null;<br />
<br />
$this->addElement('note', 'quanityInstructions', array(<br />
'decorators' => $this->_standardNoteDecorator,<br />
'description' => "{$this->_translations->_('quanityInstructions')}"<br />
));<br />
<br />
/**<br />
* Prepare the form<br />
*<br />
* @return boolean<br />
*/<br />
private function _prepare() {<br />
<br />
/**<br />
* Grab the browsers locale<br />
*/<br />
$this->_locale = Zend_Registry::get('locale');<br />
<br />
/**<br />
* If the browser is locale isn't English or Spanish then default to<br />
* English<br />
*/<br />
if (!$this->_checkForValidLocaleRegion($this->_locale)) {<br />
$this->_locale = new Zend_Locale('en_US');<br />
}<br />
<br />
$transFile = ucfirst($this->_locale->getLanguage()).'.php';<br />
<br />
$this->_translations = new Zend_Translate('array', realpath(dirname(__FILE__).'/../../Models/HemOnc/Languages/'.$transFile), $this->_locale);<br />
<br />
return true;<br />
}<br />
<br />
/**<br />
* Check to make sure that browser's locale is english or spanish. The region<br />
* doesn't matter.<br />
*<br />
* @param Zend_Locale $zl<br />
* @return boolean<br />
*/<br />
private function _checkForValidLocaleRegion(Zend_Locale $zl) {<br />
return in_array($zl->getLanguage(), $this->_allowedLocales) ? true : false;<br />
}<br />
</code><br />
<br />
If locale is allowed then the form label translation is set.<br />
<br />
For further info please<a href="http://www.corywiles.com/contact/"> contact me</a>.thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0Memphis, TN 38105, USA35.1516237 -90.034986635.1340792 -90.0641691 35.1691682 -90.005804099999992tag:blogger.com,1999:blog-7769537882946387819.post-36669302978772440142009-01-22T08:15:00.000-06:002009-01-22T08:18:46.963-06:00Site ImprovementsLast night I finished migrating <a href="http://www.corywiles.com/">www.corywiles.com</a> to a complete <a href="http://framework.zend.com/">Zend Framework</a> MVC app. Now that is done there should be significant site improvements mostly due to enhanced caching.thealphahttp://www.blogger.com/profile/09202279178281956900noreply@blogger.com0