Quicksearch |
Tuesday, January 23. 2007
Desk Pictures Posted by Ben D. Benner
at
23:29
Comments (0) Trackbacks (0) Defined tags for this entry: Books, desk pics, IKEA, LCD Monitor, Monitor Arm, MOView, PHP, pictures, uRevoo
Desk PicturesBooks that I am working on. The JavaScript book is for reference. 1776 is interesting. Haven't started Wikinomics, I probably will finish the World Is Flat before we go to Michigan in July. Thursday, August 17. 2006No sleep till Dallas!
I wanted to make a quick post before passing out.
I have gotten the new server to a point where the OS, apache, mysql and php are ready to go. I did a test restore of my blog, and it worked pretty well. I am going to need to restore the filesystem structure for a perfect restore, but the partial worked pretty darn well. I also did a test install of dotProject, since the gd library is primarily used for that. Well I have a few last clean up items for the server before bedtime. I bought some expansion slot covers and a couple of new fans. I think I need to be in bed in about 30 minutes so... Laterz 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 Wednesday, July 19. 2006OpenSource vs Best of Breed
This is an age old debate.
I think that overall the Best of Breed way of building a company or an internet service or anything related to technology (mainly software) was the way you had to do things. Because when the phrase was coined OpenSource wasn't around or in such a state of infancy it was considered crappy free software that only "propeller heads" or geeks would use. Well, some OpenSource software is still pretty much for only experienced developers and power users. However, there are many big named OpenSource software systems that have become a Best of Breed within the OpenSource movement. But my thoughts was not really about the issue between say RedHat vs Suse or MySQL vs PostgreSQL. Rather, more so the idea of buying HP or IBM Proprietary RISC based servers vs buying Intel/AMD based units. (Note: HP & IBM's RISC based systems use their own flavor of unix, AIX, HP-UX, vs x86 based servers running Linux). Or running Oracle or Informix vs MySQL or PostgreSQL. Running JAVA vs Python or PHP. Those examples are much more related to building software. But it goes further into the business realm these days. MS-Office vs StarOffice. MS-Project vs DotProject SalesForce/ACT vs SugarCRM Visio vs Gliffy Now usually the large companies like Microsoft and Oracle will immediately start saying "Total Cost of Ownership for OpenSource is higher than with us." That statement has some valid yet still flawed logic. 1. Harder to install Con - Yes, more a competent IT staff is required to install. Meaning either higher wage or other expense for training. Pro - Don't you want to have an IT staff that is competent and trained. Out of the box software can be dumbed down to allow for use by the less technically savvy. However, the more you dumb it down, the less powerful it becomes. 2. There is no support for OpenSource Con - There is no FREE telephone support for OpenSource software. You have to purchase telephone/live support. Pro - There is plenty of FREE online support. And the support costs for OpenSource are almost always less than those from a Best of Breed. Note: Certain companies that offer Operating Systems for businesses allow for like 30-60 minutes of free telephone support after which the rate becomes $25-50 an hour. (I will have to come back to this later, those are the two main arguements that I can remember off the top of my head.) I would like to note that I did a comparison for Informix vs MySQL training. And to become fully trained and certified in MySQL the cost if about 50% of the comperable training for Informix. On one hand you could say, MySQL isn't as complex as Informix, so that is why the training costs less. Because Informix is more complex, thus it is better. I usually believe that less is more. And the less complex something is to achieve a goal the better, less chance of failure, less to learn. I believe that properly tuned MySQL can perform on a level equal to an Informix installation. I know that there are benchmarks out that that show Informix beats MySQL on a number of operations. But here is something to think about. When you buy a BIG expensive piece of software like a database engine or even an HP-UX based box. You are limiting your architectural plans due to the cost of equipment and software. When you utilize OpenSource to buy cheap hardware (quality still, just cheaper) and cheap software, you can build your application or setup your business to handle perfomance problems. So if one MySQL box can only handle say 80% of the load of an Informix box. But the cost of the Informix box is about double if not triple the cost of MySQL. Why not just buy two MySQL boxes, split the load and move on. Because remember, when we are talking about building apps. If there is one box, you best have a spare. This means more hardware and more software. So it always makes sense to use the cheapest hardware you can, without sacrificing needed quality. And again, who wouldn't want competently trained IT staff. Thursday, June 29. 2006Quick entry...
I just wanted to make a quick entry.
I recently wrapped up a project that has taken longer in the real-time world than I had wanted. The delay in completion came from interruptions and a couple of gotchas. It was one of those things where the primary task is simple and easy (it really was, done in like 45 minutes). However, to properly support that primary task you need other interfaces, more logic on managing it, etc. So it snowballed a little bit, but I tried to keep things within a small scope. I don't think I should talk too much about what the project was. But in short I put together a simplistic PHP middle-layer to accept HTTP_POST information from a client, so that they wouldn't have to send stuff directly to the SOAP based API. To anyone that isn't from work, or Jeremy that was probably pretty confusing. Let's just say I built something that "Made it easier to do business." I only play programmer when I have to for work, and typically for protoypes. Which is honestly fine with me. I like to dabble, my skillset however keeps me involved with multiple disciplines of business, programming is probably the smallest. My company has plenty of professional programmers, most of them good, some of them are new and still learning. However, there are time when you just need to get it done quickly, just to try something out, to "throw it against the wall and see if it sticks." That is when I usually find myself sitting in front of the monitor doing some "coding", instead of doing some "writing". Gina wrote a good entry last night. Well it is 9:00 am, time to start work. More at lunch. Monday, June 19. 2006
MySql rocks, ASP.NET bites my shiny ... Posted by Ben D. Benner
at
20:05
Comments (3) Trackbacks (0) MySql rocks, ASP.NET bites my shiny metal ass
Yeah, blatant Futurama reference.
So I have decided overall that this is my personal blog. I am going to have to keep some blogs for work and side project, but this one is all me. Moving on, I was enlisted by my buddy to help them convert from Access to MySql on their enterprise database. Now, don't get me wrong I loved Access, back in the day. Before MySql was around. Because that was the Poor man's database, now it is just the ignorant man's database. MySql is fscking easy. I mean if you consider yourself a linux user you can probably install MySql. If your a windows users, it is so, so much easier. I honestly had the database engine installed in about 10 minuts. Now there is a trick to converting between Access and MySql. However, a good chunk of the work can be done using their Migration tool. But as I have found out it doesn't flawlessly convert. Things like default values and autoincrement fields get lost in the shuffle. So if your converting, you will need to go through the access database and make a list, check it twice and make sure that the conversion is not naughty, but nice. I am not going to place any blame on the coder who was enlisted to modify the code from Access to MySql, cuz well he isn't the guy that wrote it originally. The original coder, i mean honestly, I never met the man, but from what I have seen as the results and from hearsay he is a fscking moron. But Asp.Net just sucks. I don't like it. Yes, Yes it is better than the old ASP VbScript. Which I was fairly familiar with. I AM A LAMP SNOB! I don't necessarily say "Fsck you Micro$oft" but I definitely can be considered that as of late. I dig LAMP (Linux Apache MySql PHP). I think the bang for your buck is with Linux. I mean sure there is more TCO (total cost of ownership) in regards to your staff having ot be more skillful with computers, but isn't that a good thing? I mean to have a staff that is more competent vs one thta just gets by with simple point and click? I mean i started out as the latter and worked my way up into the ranks of someone who can install windows or linux. I also learned to install and admin apache and mysql. This endevour was my first attempt at a windows based MySql install. Like I said it was really, really easy. The tweaking of the conversion from Access to MySql is something I should have paid more attention to. Anyway, I know there are a lot of big sites that run ASP.Net but overall I have not been impressed with it as a techology. Windows based platforms seem to need more horsepower than a LAMP based platform. And there seem to be a lot more creative (and cheaper) methods for building redundant clusters. So the cheap bastard in me loves LAMP because there is no lincensing costs. The even cheaper bastard in me loves the fact that you can use a P3-600 with 1 GB of ram and have a half decent web server.
« previous page
(Page 1 of 1, totaling 6 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 ArchivesSyndicate This BlogStatisticsLast entry: 2008-06-18 01:19
431 entries written
136 comments have been made
CommentsCall Center Software about 30,000 Feet, 18 Hours and a bag of cheeseburgers Sun, 15.03.2009 10:23 She described them as Sales Guys and that they were going to Manila for three weeks. Apparently they are rotating sales [...] furnace filters about My mom is a blogger! Mon, 22.09.2008 04:13 Wow your mom is "My mom is a blogger!" i hope my mom too... CJ about The deed has been done. Sat, 23.08.2008 04:54 I have hair very similiar to yours. I thinks its because I told a hair stylist to make my hair more curly. my hair went [...] |
