RSS
 

Posts Tagged ‘PHP’

Reviving the ccPhp Framework

10 Nov

I had kinda given up on my PHP framework (as I’d mentioned in my “Simplicity via PHP Frameworks” article). But as I embarked on another little web project and realized that I might b … Reviving ccPhp. It took longer than I would have liked, to get up and running. … I noted that, at its core, it has a very programmatic approach to building a web page. That is, it assumes …

[This post was hacked, due to a WordPress bug, and I hadn’t backed it up. I tried to find it via some of the web caching/archival sites like achive.org, but, to no avail. The snippet above was a snippet from what the Facebook page preserved. A lot of thought went into the post, but once I spew my thoughts out onto the page, I wipe my brain of the details. If I find the rest, I’ll update this.]

 
 

Simplicity via PHP Frameworks

05 Apr

PHP language and web-technologyA long time ago, I’d endeavored to create my own lightweight PHP framework, ccPHP. It was a good exercise, but never reached prime time. Around that time I began to notice others endeavoring to do the same thing (i.e., create simpler, lighter weight PHP frameworks that didn’t take more time to learn than to implement the project). I’ve been away for a while and things have changed.

  1. The continued refinement and simplification of frameworks.
  2. The greater emphasis on frontend apps to do more of the work that used to be done in the middle tier.
  3. The ubiquity of RESTful interfaces, the dividing line between front-ends and servers.

Micro-PHP Frameworks

I doubt that I will ever finish my own framework, now that others are a lot closer to the goals that I was moving towards. And, right now, I simply want to find a lightweight modular frameworks that truly help me get my core work done. Dragan Gaic did a great survey of the PHP hot frameworks in Top 12 Best PHP RESTful Micro Frameworks (Pro/Con).

A key feature of such frameworks is for them to be modular to allow me to pick and choose only the components I need, rather than have to install, understand, and run a bunch of functionality that I do not need. It makes it harder for the developer and impacts performance of the results. Model-View-Controler (MVC) is a common software architecture pattern. With the client side being far more capable of managing the view part, on its own, the server side can be simpler. Instead of cluttering up the server-side app with trying to display information, it can simply focus on securing data and access and providing data services via RESTful interfaces.

So, what I am looking for are pieces to help me access persistent data and build RESTful interfaces. And something to help keep all the code flow organized. Based on the article, I can look at Silex, Slim, Lumen, or Phalcon for the latter. For database access, Ive worked with RedBeans before and liked it, so I will probably pick that up again. If one of the frameworks doesnt help implement and configure a RESTful interface simply, then I may get back into the framework building business again.

Model: RedBeans
View: Frontend client
Controler: one of Silex, Slim, Lumen, or Phalcon

A WordPress bug allowed my website to be hacked. I thought this was lost forever until I thought to reconstitute it from http://Archive.org!!

 

Activating OS X’s Builtin Apache Web Server and PHP

14 Jan

As I mentioned in my prior post OS X Command-line Dev Tools—Install Shortcut, OS X comes with a variety of built-in tools suited for developers. Unfortunately, Apple has seen fit to hide one of the most important of them: the web server. Despite that, they are easily unlocked if you know how. This applies to Mountain Lion (10.8) and (though I haven’t tried it, yet) Mavericks (10.9). Though you can install separate installations, I don’t like to install anything extra, unless I must. Read the rest of this entry »

 

PHP Recipe to Show Source-code

19 Nov

PHP source-code display recipeHere is a simple Web 1.5 (static HTML with a little bit of styling and JavaScript) recipe to allow a viewer of your web page to see the PHP source-code, behind it, with a minimal amount of JavaScript and a little CSS manipulation—good for showing the work you’ve done to others. Or for embedding in your own source, in debug mode, so that teammates can see each others’ work.

See the example code at: http://cachecrew.com/sample_code/highlight_file.php and http://cachecrew.com//sample_code/highlight_file2.php.

The PHP and HTML Read the rest of this entry »

 

The ccPhp Framework: Installation

24 May

I have a whole series of posts, waiting in draft, describing my evolving PHP framework, I call ccPhp. If you have nothing better to do than play with someone else’s dalliances, then here is a quick installation guide.  A little backwards, because I’ve yet to publish reasons why you’d want to. But, if, after my eventual publications describe this framework, you decide to install it, this is the quickest place to see how to do that.

The following describes only one way to arrange the setup.  I have designed the framework with few cross-dependencies.  After my “standard” setup description, I will describe the few file dependencies so that you easily define your own file organization. (If you are on Windows, you can extrapolate the appropriate things to do there). Read the rest of this entry »

 

Fixing an Infected PHP/WordPress Web Server

17 Apr

Fixing an infected WordPress server. Darn if the ISP serving up our PHP and WordPress content wasn’t attacked with an exploit. So I did a lot of learning as I cleaned up my web server, this past weekend. The goal of this exploit was to infect visitors of the web site with viruses by coercing visitors’ browsers to download malware from predefined third-party sites, seeded with the malware. That means modifying web site code to send visitors to those malicious sites.

After noticing some strange behavior that tripped my anti-virus software on my Windows machine, Read the rest of this entry »

 
 

Buried in PHP Frameworks

30 Sep

With thanks to “moomin lens” via Flickr http://www.flickr.com/photos/jumpn_around/185876077/

There are 100s of PHP frameworks out there, but I have been so frustrated with so many of them; they are either too complex, not well designed, not well documented, buggy, or all of the above. Also, there is a lot of great technology for PHP that are notfull frameworks. It’d be nice to have a framework that does not try to do everything but, instead, allow easy integration of “best of breed” technologies. And a much more subjectively, only a subset of frameworks out there (though growing) embrace object design as typical of traditional, non-web programming using C++, Java, C#, etc. PHP 5 allows that kind of programming, but not all framework developers have embraced that approached it yet. I’ve spend a non-trivial amount of time with the following (well, I haven’t spend enough time with Kohana, yet): Read the rest of this entry »