Drupal research strategy (custom or ready module) [closed] - php

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
When you get a description of some project that should be made with Drupal, and requires some extra-functionality (beyond core and most popular modules), how do you decide how're going to do it?
Do you spend a day or two (or week?) searching for all possible modules, narrowing down the list?
What is the cricial point to start writing own module?
What is the cricial point to start altering some more or less suitable module?
To be more precise, lets imagine I am going to do a time Booking system in Drupal 5, but there are no modules that do exactly what I want.
What are the most important pros and cons when it comes to selecting the ground to build the Drupal project upon?

I will use a pre-built module only if:
it is for UI purposes. For example, an image gallery.
it is really, really well consolideted (like the views module for example, or imagecache), is specialized in one task and does it well, and if it serves my purpose whithout any modification (because it just fits, because I can adapt the requirements to make them fit, or because it offers extension points like an api or such)
what I need to achieve is peripheral to the system, and there exists a module which will do something similar, and it is easy to modify it and then maintain it
I will make my own if:
the functionality is "core" to my system and there is not a module which fits
the modules I found are new, not actively maintained, messy coded, etc...
In fact I usually prefer coding my own modules, which I have total control over, than adopt foreing ones, with the risk of having more troubles with them than advantages...

I'd say it really depends on what it is you want to do. If what you want to do is not to complicated, and you can't find a module for it. Chances are that even if you do find one or one that is close, that you end up spending more time searching that would have spent making your own. Where that line is, depends on how skilled you are and how intimate you are with Drupal. After doing lots of small custom modules you end up with a lot of snippets you can reuse making writing new modules quite fast.
Sometimes you can even take a module and make your own to modify it, to make the origin fit your needs. For me, I usually never spend more than a few houres trying to find a module. If I can't find it by then, it's usually
Not maintained and way old.
Still in development
Even if you can get a bit of a head start you might end up struggling in the end, with bad database designs and the like. But it's hard to say where the breaking point of using others halfway there code is. It depends on how hard or how much time YOU have to spend, to make it, vs the struggles you get using it.

Related

Procedural PHP vs Object Oriented PHP [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am fairly new to PHP (you just have to see some of my previous/recent posts!). I have done a lot of my learning by studying other people's frameworks and attempting to rewrite them for my own purpose.
Out of the examples of code I have seen, it seems about 50/50 Procedural to OOP. My question is not which is better, but when should I consider using OOP over Procedural?
By the way, I don't want to encourage an open discussion of personal opinions as to why one should be used above the other. I am fully aware, after researching, that some people just prefer to use one or the other. I am after a legitimate reason as to what would encourage me to use one over the other and in what situations.
I have also read through a few different (but similar) questions on the subject, but they seem to be flagged as not constructive because it starts a debate. I don't want this, I am on a Q&A site as I am looking for an answer, not an argument.
Even thou it is 2014, you are still allowed to wash your dishes by hand, communicate with all your friends only in person, landline phone calls or letters send by the local postal service.
And you might feel incredibly well doing so.
But if you try to host a lot of dinner parties for a lot of people and organise important projects with a lot of people from remote destinations, having hard deadlines, you might consider getting a modern dishwasching machine and a smartphone.
Same goes for OOP vs. procedual. If you are just adding a tiny piece of functionality (display the current date, echo a random hash string) on your wordpress weblog: Go procedual.
If you are writing a tiny tool that does something you need to get done, if you are writing a tiny cron job batch script in PHP or if you are just fooling arround - do as you like.
But if you plan to develop sustainable, maintainable, testable, reusable, quality software that has a lot of features you should at least use OOP. Because it is bloody 2014.
OOP will enable you to blackbox and whitebox test units of your code seperately. It will enable you to not only efficiently reuse libraries and modules written by others but alos enable you to produce modules and libraris that can be reused by others.

Startup building and mokup [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
since about two years ago, I did find my interest in code (Hardware/Sytems/Web) and now, I've found a project which motivates me a lot (It takes all my free time indeed).
Starting this point and because my project could soon switch from a free time project to a daily job, I'm currently developing a mockup of this project based on PHP/MySQL and JQuery.
Even if I'm a true Python/MongoDB lover and a System Engineer, I did prefer those technologies to build up my mockup because of their simplicity to build a complete functional private stack at home.
I'm pretty advanced on my mockup and it seems to work as I want it.
Now I'm wondering if, about your point of view, would have been better to start to build my mockup using directly the targeted technologies (Python/MongoDB) rather than to use the easy PHP/MySQL couple to do it?
Obviously, because I plan to made this project my daily job, I had to have something visually functionnal to be able to raise a little bit of money, and about me, using an easier stack it's more easy, but I would like to have your feedback on this kind of question.
The idea that PHP/MySQL is easier or simpler than say Python/MongoDB is just inconsistent.
If you compare for example, Django (the most popular python web framework) with symfony(PHP) you will find that they are almost identical in terms of features and architecture (symfony is actually slightly more complex but also has more very advanced features).
For mockups, if I were you, I would use solely HTML/jQuery/CSS.
Build your pages just like you would like to have them in your beta version, use jQuery to load sample data written in json.
That's all you need. You can even find WYSIWYG application to speed up the process.
Later on, you can build the back-end application using either python or php, it won't matter.
The integration process will be identical, create your models, create the controllers, and use the HTML you already have as templates.
Building your app in php/mysql then convert it to python/mangodb will make you rewrite almost all the code simply because python is so much different from php (easier I would say too, but that's just my opinion) and because mangodb is not a relational database meaning you will have also to rethink partially your architecture.

PHP encoders: How secure are they? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
For a new project of mine, I want to protect my code. I've already searched this and other forums, but most topics were a few years old and software can change.
I know that the "big three" are ZendGuard, ionCube and SourceGuardian. Now while Zend has a fairly good reputation for being secure, it is too expensive for my needs, so I'm left with ionCube and SourceGuardian. I did some research to determine how secure each product is and I came across freelancer.com, where people hire other people to decrypt and deobfuscate their source code. I've found relatively many ionCube adverts -- also some with the most recent version of the ionCube encoder. On the other hand, the SourceGuardian projects that I found were all encrypted using older versions of the software. Zend's product seems to be the safest, since I didn't really find anything.
Since I don't want to waste a few hundred dollars on a product that only makes my code harder to read, I wanted to know: what is your opinion on the security of PHP encoding software and which of the products do you deem the best?
Ioncube and dynamic keys. Protect as many functions as you can in all your PHP files with different keygen() functions. I know people that decode a single PHP file for 30$ if the file contains one or two keygen() functions. If your file contains more keygens the price changes.
My project contains 1000 PHP files with 8 protected functions on average in each file and the license check is present practically in every file. Only 15% drop in performance.
1000 files x $30 x 4 = $120,000
The cost for cracking/decoding is bigger than the cost of the software itself.
Plus, a skilled programmer may need 2 to 5 hours to figure out the logic of a single keygen.
If you want to "protect" your code, you have 3 options:
Don't make your code public. Simple enough, if your PHP code isn't public, no one can see it or mess with it.
Make your code public, and abandon "protecting" your code (What's called an "Open Source Project").
Don't use PHP. Use some sort of other compiled language, like Java or C.
Those are the options you get. Any obfocuser and be deobfocused when enough time, effort and persistence is given to it. Plus, one small mistake and you'll never be able to read your code again.
I think if you really want to protect your code, you need to find better ways than code obfuscator, Encoder of any type or whatever make your code more difficult to read. The best deal is to manage well who has the access to your code, and make a good contract with all parts envolved in the project.
Take a look at my question some time ago -> https://softwareengineering.stackexchange.com/questions/29496/open-source-php-encoder
and this another question
Can you "compile" PHP code?
I think it will head you in your decisions about buy some software that promisses the impossible.

PHP or Lift framework for a web application? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm currently developing a web application using PHP, but I'm considering developing the web application using the lift framework instead, because twitter and foursquare have implemented it. I know a few benefits using lift/Scala but, could you guys mention some benefits compared to PHP?
Many thanks
Resmus Lerdorf, the inventor of PHP, once said with regards to foursqaure (build with scala/lift) that it's the first site for a long time that doesn't have a single security hole he could find.
If you're having trouble enumerating the reasons why you'd use scala/lift over PHP, you'll probably want to stick with PHP. PHP is a far more mature and supported platform - oodles of documentation, huge community, tons of tools and libraries.
Scala is a great language, but the primary reason it's being used by Twitter and Foursquare is it's ability to work with enormous sets of data on a horizontally scaled architecture. These are very specific problems for these companies, and Scala was chosen for this purpose very deliberately.
As someone who has recently begun learning Scala, the community and documentation is minute compared to PHP's. Especially where Lift is concerned. And things like IDE support is still in it's early stages.
There's really no way to compare the two technologies (very different approaches). If want to use Scala, use it, but you'll probably be investing more time and energy if you're not already proficient (also, some background in Java doesn't hurt). PHP is just PHP, it's so easy to just pick up and use.
If you ask such a question you'd better stay with PHP. Once your project becomes more and more complex and you are fed up with PHP limitations the question will disappear on its own.
But Lift does not have to be the framework of your choice.
You should consider anything except PHP a good language for web applications, but Scala is a pretty excellent one, although it will change the way you think about programming as a whole. Some people can't handle that, so be warned.
PHP advantages:
Is installed even on the cheapest "5ยข-a-month" webhoster.
PHP disadvantages:
The libraries are not stable and change every now and then, often without notice.
The whole language is buggy and generally doesn't work as a sane person would expect.
The documentation is unusable, sometimes wrong, sometimes only understandable with the user supplied usage examples (which are often wrong or not optimal, too).
No quick way to see the implementation of some language-supplied code.
The API is one big mess ... this shouldn't be called API, it should be called MCOBRIM: Messy Collection of Buggy, Random and Ill-named Methods.

Localization as an afterthought-- screwed? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
So I signed on with a startup web development company as a subcontractor. They are putting together a large, complex user/product management system for a company that needs to support multiple levels of hierarchial localization. I signed a 3 month contract, and upon looking at their code, wish I hadn't.
They opted to write their own MVC framework (I guess the client company didn't want to use a prewritten one) and it's extremely poorly written. There's SQL scattered throughout almost every model view and controller (and there's no parameter-based find methods, it's all SQL) and they haven't even THOUGHT about localization yet-- something that will have an affect on nearly EVERY query.
The due date is 4 months away, and I honestly think we'd make good progress by scrapping the whole thing and going with CakePHP. Have any of you been in a similar situation, and what did you do?
PS: This is written in PHP/MySQL.
Rewriting from scratch is almost always the wrong idea (Read Joel's article Things You Should Never Do -- Part 1). But you have to start implementing small changes (big in your case). The sooner you get the code cleaned up the better it is for developing in... Get a sane data access layer and try to sort out the ad-hoc MVC first.
Also, while you are fighting battles, start planning out what needs to happen and get the upper brass used to the idea that some features might not make it in. I don't know your code base, or big or how messy it is... but if it is really bad then they should be prepared to ship a product minus some features rather than a half-baked solution.
Take charge on these issues, you (like the rest of us) get the pleasure of inheriting the sins of a codebase's previous owners. Is there any chance they would extend the contract or pay overtime for extra work you put in?
When you work for someone, you play by their rules. I've worked on a couple of sites using Expression Engine. I hated every minute of it, and I strongly recommend against it every time it comes up with my client, but what can you do, other than grind through the work until you're done?
Feel free to offer the suggestion about CakePHP, but I would drop it if nobody wants to hear it. Be happy you're only on for 3 months.

Categories