Hacker Newsnew | past | comments | ask | show | jobs | submit | jonseg's commentslogin

You are right :( I want to review all pull request with careful, It implies a lot of code and I need find the time.


Just tell them that then... no harm in being straightforward.


This is good advice. I used to help maintain a bit on the bigger size project on Github and our lead developer I think really wanted to spend time looking over and trying to give quality responses. Which ended up sometimes taking a long time or not at all. Unfortunately, it came off to some people as not caring about their submissions. Just a simple message about being busy and asking them to remind you if you forget works wonders.

Example: "Thanks for sending this in. I'm busy right now but will look into it later. If I haven't responded in a week or two, do me a favor and ping this thread."


Thank you :)


Hi, with this tool you have control over the generated code. You can add a login system, modify the views, add an upload images system...

The tool generates a base administrator and you can add all functionalities that you want.


Hi Jon, you should show some examples on the home page on how to extend the code. For example if I wanted to modify the administration for one of the tables is there a base class that I can inherit from? For example if I wanted to a hide a particular field in the admin, or if I had some custom validation rules.

Is this designed to work with any particular framework?


The generated code is "pure" PHP. You have a controller for create, edit, list and delete. You can modify the controllers without problems and extend the functionalities. You can hide fields, add new ones, implement an upload images/files system...

The used framework is Silex (http://silex.sensiolabs.org/)

Thank you.


If I understand, the approach that you are taking is that code is generated for the admin using the generator and then you would do modifications afterwards? What happens in such a case that the code is modified and then you run the generator again?

An alternative approach would be to supply custom classes to the generator at the time that it generates.

For example.

  Class CustomerTable extends AdminTable {  
    $hiddenfields = [ "created_date" , "password" ];
    $validation = [ "email" => "validateEmail"];

    function validateEmail($validate_data) {
       return validEmailAddress($validate_data);
    }
  }  
Then the user can place this class somewhere specific or register it with the generator in some way, and when the generator runs it will use this class and not overwrite changes.

Like

  $adminGenerator->use("customer","CustomerTable");
This way you can keep using the generator even after you have done extensive modification to the tables and code.


Is there a good split between generated/edited code? Or do I have to change the generated code?

Also, can I regenerate only parts of the interface (after changes to the database, for instance)?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: