Skip to main content

Posts

CMS/site project status

1149 lines of code so far. That’s not including and database file initialization code or other things such as the css for the public site. Completed (“somewhat tested”): Add/edit main page links Add/edit/delete main page basic html content blocks Visual template system and the final visual look of the site. Public index.php looks “done” visually. The main links work and display all basic – content blocks when clicked (ordered by ‘zorder’). It’s just lacking sub links (articles and galleries). To Be Completed: Delete main page links (I haven’t decided if I want it to do a recursive deletion of all content associated with it or not). Add/edit/delete articles (aka. multipage basic html content blocks). Add/edit/delete image galleries. Make the admin pages secure. Testing, testing, and more testing! I’ve been thinking of not bothering with an image gallery aspect. The multi page articles would have similar abilities to a photo gallery. The only difference is that it could not support ...

Accessing page content from the front and back-end of a site

As I’m programming this database driven website, I’ve come into a few irritating little issues. Today I’ll talk about a few methods to access page content (images) from the back-end. I’ve created a way to create and edit page content with a browser based WYSIWYG editor. The problem is after the first time the data is submitted to the server, all images are set with a path that now only works from the root directory of the website. So when a user tries to edit some page content with images in the WYSIWYG editor they see broken images (aka. “The dreaded Red X”). I thought of a few ways to fix the problem. I’ll also mention which method I actually used in the end. 1. Have the PHP script handle the path conversions. This would mean two functions or so with a few replacements using regular expressions. So when the fetched data is sent to the user all of the html image tags are modified. When or if the user sends the data back they are remodified (excluding any new images the user is...

Finally got moving on something...

From the previous posts it’s easy to notice that I’ve been searching for an efficient way to code large web projects. While I am still open to frameworks and such, I had something happen that kind of “brought me back to my roots.” I have the job of making a website for a not-for-profit organization in my area. I decided that they should have something easy to update, so that means a data driven site with a back-end. I don’t want to use premade systems because they have too many things I don’t want included. I therefore decided to go with what I’ve worked with in the past which is straight PHP. More specifically PHP5+ and the SQLite database engine. PHP5 perfects a good deal of useful features over the older versions such as the class/object model. It also adds support built-in for the file based SQLite engine. For what I am creating, SQLite takes out a lot of the unnecessary complexity of using MySQL. I’ve got the database and gene...

Getting a Symfony development enviroment running on windows

Nothing is ever easy… Anyways, to get a computer ready to start developing with the Symfony PHP framework you have a few options. You can take the long, long route and install apache, php, and a database server. With that you have to do a good deal of configuration to get everything working together. You could also download WAMP or XAMPP, which are just prepackaged versions. I haven’t used XAMPP, so I can’t say how you would get that working. The best reason for using WAMP is that it is self contained in c:\wamp folder by default. You can also start and stop all of the server processes (Apache & MySQL) anytime by just closing the tray icon. It’s great so you don’t have unnecessary processes running all of the time. The main problem is that WAMP and Symfony don’t work “out of the box.” No surprise there. This is the process I used to get WAMP working with Symfony: Download WAMP (1.6.6) and install: http://www.wampserver.com/en/ Open a browser to http://localhost/ WAMP should...

Looking for faster development methods

Over the past week or two I’ve been researching ways to develop server-side web based applications as fast as possible (time is money, haha). I am in the initial stages of starting a little side business with a friend and one of our possible clients is looking for a large system to handle online ordering of their products. If you know anything about developing and programming a complex system, it takes a lot of planning as well as a good deal of time to actually create it. My “developer ideals” won’t allow my to create something of poor quality, so I’ve been reluctant to take on large things in the past. I’ve been pushing myself more lately to produce results the results I strive for with more speed. Well more like I’ve been trying to learn new methods and techniques where I can keep my quality level high, but just get things done faster. While I’ve programmed in PHP before, I know that I would need to create a large amount of generic functionality to handle an ordering system. T...

A bit disappointed so far...

I started playing around with Visual Web Developer Express 2005 (VWD). I had originally planned on using VWD with MySQL. The problem is that to use the new stuff in ASP.NET 2.0 like the pre-made authentication you have to use Microsoft’s own SQL server, or try to get some convoluted method of making MySQL work as the provider. I’m sure that I could eventually get it working, but in the end it would not provide me the free easy to use fast development solution I was looking for in asp.net and MySQL. I had a plan to develop a dynamic small business website with user authentication, but I see now that it probably won’t be with VWD Express and MySQL. If I have to reinvent the wheel for everything I’d rather just use PHP and MySQL. That being said, I still plan on messing around with VWD and Microsoft’s SQL Express. I might be doing some research about Ruby On Rails to see if that would better meet my needs.

Learning asp.net visually

Microsoft has a great site with video tutorials here . They cover various aspects of visual web developer in VB and C#. They can’t cover topics in too much detail, but more then enough to be worth while. Plus they are free…

Flash video in a website

While researching about displaying video in web pages I came upon a good [free] solution. It uses: Free and open source flash based video player called FlowPlayer. Their website: http://flowplayer.sourceforge.net/ To encode the videos into the flv video format I used a free tool called Riva FLV Encoder. Their website: http://rivavx.de/?encoder Why a flash player as apposed to quicktime/windows media player/real player? A lot more people have Adobe Flash installed and it’s just a generally more foolproof method of serving videos on the web (aka. the extremely popular youtube.com is flash based). Here is an example of the html required: <object type="application/x-shockwave-flash" data="videos/FlowPlayer.swf" width="320" height="263" id="FlowPlayer"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="videos/FlowPlayer.swf" /> <param name=...

VB.NET is a pleasure

I started using VB.NET to write that JSON/FTP/site editor program. I found a free ready made library to work with the JSON data. It’s from Newtonsoft Really easy to use. They don’t have much documentation, but just looking through the library with IntelliSense in the VB IDE is more than enough to understand how to use it. With around 6 lines of code I can flip data between CLR objects and JSON. Very nice! I used VB.NET 2003 version about a year ago for the final group project in the last computer class I had. It didn’t seem as easy to use as the 2005 express version I am using now. It’s probably because that was my first foray into using .NET… anyways. A a quick term list: CLR = common language runtime JSON = JavaScript object notation IDE = integrated development environment FTP = file transfer protocol VB = Visual Basic programming language (.NET version) IntelliSense = One of the ways Microsoft makes coding easier in the IDE.

A few mishaps while getting the site ready

The ajax/json site is fully functional now. I had a few problems though that I’ll discuss here. First off, the simple hosting that is provided my my isp isn’t working correctly, so I had to look for an alternative host to do testing on. I found 50webs.com which provides 60mb of free bannerless hosting. They even allow you to use domain names with their free service, which is great. I got that setup and now my sister’s site (while slow) is on there and directly uses the domain name. Today I showed the site to a friend, who in turn said that it didn’t work. He was using IE7. I use Firefox usually and had not gotten around to trying the completed site on different browsers… Anyways I figured out the problem and the site now works on Firefox2/Opera9/IE6/IE7. What caused IE6 and 7 to not display the site? It seems that IE requires a new AJAX object for every request. I had it setup initially to define one AJAX object when the page loaded and reuse it. I...