PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Embedding search in 'modern' PHP framework (eg Laravel)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Embedding search in 'modern' PHP framework (eg Laravel)

    I have v7.1 (build 1019 Enterprise Ed). We're porting our website (www.pscs.co.uk) to use the Laravel framework rather than being random PHP pages (written 10+ years ago without a framework), and I'm having problems with getting the Zoom search page working properly.

    Currently, we've got to have the Zoom search as a standalone PHP page, which means that it doesn't use the templating that the other pages use, which is a bit of a pain.

    The problem seems to be that it's written using lots of global variables etc, rather than as a more modern class-based PHP system. (I see that Zoom needs PHP 4.2.0 or later, which is pre-2004...)

    Are there any plans to rewrite 'search.php' using a more modern style of PHP (virtually no one will be using anything earlier than 5.5 nowadays)? Or, are we going to need to port search.php to a class-based engine ourselves? (or look for an alternative search system).

  • #2
    There are certainly pros and cons to new and old code.

    Zoom has been around for about 14 years. This means ~14 years of coding, feature building, testing, optimizing and debugging. It is hard to beat that in terms of providing a comprehensive feature set, stability and performance when it comes to something as complex as a search engine.

    Anyone who writes code knows that there's no such thing as bug-free code. There is only code that's well tested (with less bugs), and code that's not well tested (with more bugs).

    We are certainly aware of the benefits of OO and modern approaches that have become more common in PHP. Some of the choices made in our PHP script were made for the priorities of the time such as backwards compatibility, and integration flexibility, which, at the time, meant not adhering to any particular framework or model -- as many were not mature (or non existent), and have since come and went.

    However, at this stage, the demand (or lack there of) for a rewrite to modern trends has not justified doing so, let alone, the inevitable introduction of bugs and problems that will take years to iron out to the same level of stability that the current code allows.

    We are not personally familiar with Laravel but we recognize it has grown in popularity in the last few years (at 6 years old). At the end of the day, it will depend on demand and need.

    Zoom's "search.php" is currently designed as a stand-alone page (which can be included within another PHP script with some care), but it is not a class within a particular framework. It should be possible to "wrap" the code (i.e. write a wrapper class) for the framework of choice, and experienced developers have done so.

    You can also find tutorials for using Zoom with popular packages (Wordpress, Drupal, DNN, etc..) here
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment

    Working...
    X