Quicksearch |
Wednesday, May 16. 2007Packing up and heading back
I am packing up and soon we will be heading back to Austin.
We are going to swing by the 6th floor and see if anyone is still in the Sprocket office. Then if traffic looks OK, we might swing by and say hello to Bobby. I will post more when we get back to Austin. Laterz Friday, May 4. 2007Pico @ 1am
My trip to Dallas went well. I had a great meeting with our vendor Dynamic Web formerly known as DeverGoodwin.
Bobby (Goodwin) is really cool and I consider him a friend of mine. We talked about some of the exciting stuff they have been working on as well as some of the stuff that Jaduka has been working on. I also shared some of the insights about what I learned at the Web 2.0 expo. They have a new office, very swanky. Apparently, Bobby found the perfect little office space in a very nice building off the tollway in northern Dallas. They even are doing some lobby advertising. I had Bobby pose next to their sign. Anyway, after hanging out with Bobby for a little bit after work (waiting out the traffic) I headed over to the NorthPark Mall to get Gina some stuff from Lush. I dropped Bobby off at Humperdink's to meet up with Jerry (Dever). Unfortunately, I didn't have a chance to say hi to Jerry as I had hoped. I started out towards home at about 9:30 or so. I made it to the HEB that is north of the house at about 12:30-ish. I bought the stuff to make Pico de Gallo for today's Quatro de Mayo potluck. The Pico was done by about 1:50 (am), I cleaned up the kitchen and went to bed. If your looking to outsource the development of a web application, definitely give Bobby and them a call over at Dynamic Web, they do good work and are building some very exciting stuff. Back to the grind. Laterz Thursday, October 19. 2006Fortune Favors the Bold
Or so I am told. I don't consider myself too bold. However, fortune has favored me more often than not.
A couple of updates. 1. I managed to get the faucet handle fixed. I bought a set of Allen wrenches for about $4. Worked like a charm. Go figure. Hopefully, the handle that is coming is the right part. As I did scratch up the one that is there now. The repair kit should be coming soon from Delta as well. 2. The flapperless tank is not compatible with the old toilet bowl. I ran out to Home Depot at the last minute to pick up the matching bowl. I got there with about 10 minutes to spare before closing. 3. The guest bathroom has a new toilet. It was an interesting experience removing the old toilet. And as I have described recently, removing that old wax is disgusting. Also, the flapperless tank's gasket is quite different than a regular toilet tank gasket. It is flat, it doesn't actually fit into the hole in the bowl. The flapperless tank gasket is supposed to just line up over the hole. If you aren't careful about this, water will spill out the back. As I found out. Part of the reason for this is that the flapperless bowl has slots vs holes for the bolts. The slots are intended to allow the tank to be positioned at different levels away from the wall, to ensure that the installation of a the whole toilet will fit well with the positioning of the hole for the old toilet. If it is back too far, then water comes out. If you position it all the way to the front, no problems. It would have been helpful the instructions were more explicit about this. "The gap is normally 1/2" to 1" ..." doesn't really help me. Seeing as I can't see the gap once I put the tank on the bowl, the tank covers everything. 4. Deep Space 9 Season 7 will be waiting for me when I get back from Dallas this week. I have managed to watch seasons 3 - 6 in just about a month using Netflix. I honestly cannot believe that I didn't use Netflix before now. It is an awesome service. 5. I am in Dallas. I have came to Dallas to meet with Bobby Goodwin, about the next phase of developement. I also spent some time with Brent working on the next generation of our billing system. Good stuff, it has been a while since I have had the opportunity to really design something as simple, yet complex as a billing system. I was going to do some work on our corporate site. But I can't get into the gateway from the hotel. So it will have to wait until morning. Speaking of which, it is late and I feel the need to sleep the good sleep now. laterz ps, yeah another Friday in Dallas. Tuesday, July 25. 2006Mod_Rewrite it changed the way I look at web programming
Where to start.
I was introduced to Mod_Rewrite by a pair of gentlemen who run a badass web development firm out of the Dallas Metroplex area, DeverGoodwin . I sort of understood what was used for. But quite honestly, my initial understanding was about the same as what someone (non-developer/geek) would get from looking at the following picture from the Apache documentation website. ![]() Yeah, that is what I am talking about. Looks powerful right? But what does it do exactly? It is hard to explain in just one word or even one sentance. At least without first describing what I call a "Page Server". Unfortunately I might be one of a few that use that name to describe it, if anyone out there knows a more common name for the following description, please post a comment about it. But a "Page Server" is the idea that you write your web page application in a manner that you basically maintain a small number pages that people can access from the web. But these pages (or in some cases, you only have the index.php/asp/jsp) dynamically build their content based upon a "page code" or some other type of parameter. This might leave you "non-propeller head" folks wondering what I am talking about. Have you ever visted a website where the URL ends up looking like the following? http://www.somedomain.com/index.php?pg=profile This is what I typically a "Page Server". So the concept is that rather than have to write a page that is... http://www.somedomain.com/profile.php ... you instead .... http://www.somedomain.com/index.php?pg=profile Of course the obvious question is. How exactly does that make things easier? Well when one has to code web pages that look pretty and have a consistent feel you have to deal with making each page look exactly a like. Say for instance in the header. Each page should have the same graphics across the top (or only slightly different) and they should have the same links (again or slightly different). When you are programming straight HTML, this means you have to copy and paste the code into each page. When your coding in a scripting language like PHP or ASP you get the luxury of doing an include() type of function and just doing... include(header.php); In either the Copy&Paste or include(header.php) arena you will encounter a critical mass when it comes to the number of pages you are maintaining. This can be extremely evident when one needs to update a Copyright in the footer or change up the name of one of the links. Well if you only have a few pages like 2 or 3, no big deal. Copy&Paste your heart out. But when you start having 10,20,30 pages in HTML you REALLY, REALLY should using a scripting language. Of course once your using a scripting language the benefits to using a "Page Server" design are not entirely seen in the begining, it could even be more of a philosophical debate on why to build a Page Server rather than just make individual pages using the include(header.php) methodology. I prefer the Page Server method. As it allows you to centralize your functionality, rather than having to update all sorts of pages with new path names or what not you can just update one file. If you work your switch() statement appropriately you can build new functionality into your web app quick and easily. Of course a Page Server methodology means that you are bringing folks back to the index.php through links within your app. This means that if you are pushing folks to the central index.php. But someone decides to look for... http://www.somedomain.com/about.php They will likely get a 404 error. You could build a custom 404 to try to get around some of that. This is one of the first things that I saw about mod_rewrite, it allows you control someone's visit of your site completely. If they search for a page you don't actually use it to simply force them back to your index page. Of course I am jumping a head a little bit. As we now have a basic understanding of what I am calling a Page Server, let's start looking at how Mod_Rewrite can aid the functionality of a Page Server designed app. Mod_Rewrite allows you to take the URL that is requested and break it up into variables that can be passed to the index.php page. This means that to achieve the same thing you get with... http://www.somedomain.com/index.php?pg=profile&user=fajita using a URL like this... http://www.somedomain.com/profile/fajita/ Yes, that is right. The "/profile/fajita/" is translated behind the scenes to the index.php as pg=profile&user=fajita. This means that Mod_Rewrite allows for the creation of clean URLs rather than index.php?var=blah&var2=blah2. This means that your application will look better to users as well as search engines. Now another thing that I love about mod_rewrite is that when I have done apps before using the include(module.php) I was always concerned about someone finding and browsing my module pages directly. Which meant I had to do security checks within the module to determine whether or not the person was logged in and then give a response like "unauthorized access" if they weren't and so on. This meant that I was spending time writing or Copy&Pasting that logic into a module page that was really about the module but rather trying to prevent someone from accessing the page directly. With Mod_Rewrite you have the capability to simply force everything back to the index.php page. You don't have to worry about the security checks. This overall makes it easier to code a modular web application without fear of someone browsing your module pages directly. Here is an example of a few mod_rewrite rules... Rule that allows for a one directory variable: RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?pg=$1 [NE,QSA] The "^" opens the part of the rule that looks for what is in the URL. In this case I am looking for letters (upper or lowercase) and numbers. Whatever is found is submitted to the index.php page. The QSA appends the query string useful more so when dealing with a URL like... http://www.subdomain.com/profile/fajita.php?view=pic1 However, I usually leave it on there. Yes, the fajita.php, you can write a Mod_Rewrite rule that allows you to use non-existance file names, rather than just non-existant directories as variables as well. Rule for 2 directories: RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ index.php?pg=$1&search=$2 [NE,QSA] Rule for 3 directories: RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ index.php?pg=$1&search=$2&type=$3 [NE,QSA] Rule for one directory and a file name: RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)\.php index.php?pg=$1&id=$2 [NE,QSA] Rule for just a file name: RewriteRule ^([A-Za-z0-9-]+).php$ index.php?pg=$1 [QSA] To me Mod_Rewrite changes the way I think about web programming, I think of it more as programming an cohesive application that has different modules that are called using a centralized Page Server. Rather than just building individual HTML pages or scripted pages using the include() methodology. It seems more like real programming. I have read over the Apache tutorials and there are a TON of different things you can do with Mod_Rewrite. I will post some more on it later. While seeing what DeverGoodwin could accomplish using Mod_Rewrite set me down this path. I would not have been able to finish my first project without the assistance from an interestingly named website. www.ilovejackdaniels.com, I found the mod_rewrite cheat sheet they provide to be very helpful. Laterz
« previous page
(Page 1 of 1, totaling 4 entries)
next page »
|
Recent EntriesNew Blog -- Ready Enough
Wednesday, June 18 2008 New Blog - Attempt #2 Tuesday, June 17 2008 Ummm... It's Hot! Sunday, May 25 2008 30,000 Feet, 18 Hours and a bag of cheeseburgers Monday, May 19 2008 It's A Grind Thursday, May 15 2008 Syndicate This BlogStatisticsLast entry: 2008-06-18 01:19
431 entries written
133 comments have been made
CommentsRose Owens about The search for crab and beer Fri, 09.05.2008 10:25 I hope you and Gina faired well here in THE CITY. It made me think of the “midnite tour” I give to my family when [...] Clint Noll about Back Home Mon, 05.05.2008 17:01 Ben- Listen, if i am going to take the time out of my busy day to try and read this blog to become a tad bit smarter, [...] Dad about Two Buck Chuck & Crab Sat, 26.04.2008 23:06 Hi Ben, Jim and I buy Charles Shaw by the case at Trader Joe's. It's our regular "house wine" for every day use. [...] |
