ACP based developer package to create skeleton files with correct name-spacing while system is in dev mode

  • I'm in process in converting my custom cms to woltlab which requires re-writing lots of modules and I'm already sick of recreating skeleton files manually.

    For example, in IPS community suite they have additional package called "dev tools" that includes whoops as error handling solution(very detailed) alongside possibility to create all package files, template hooks,language xml, MySQL queries for app/plugin trough admin ACP. You can literally create everything trough it, ofc those files are empty with default predefined method but they always has correct name-spacing in accordance with the app, so all you have to do is code your custom things and don't worry about the cliche part. This makes developing easy because you don't have to manually recreate skeleton files or modify name-spacing in them which saves tremendous time of work.


    This is what I miss in Woltlab so much.. If you at least allow to use file system without gziping or putting anything in tar while in dev mode it would simply things in a long run, because now to test a change you have to actually pack everything into multiple archives within tar/gzip and then reinstall/update the application. It's just a pure overkill. Other than that the framework is a perfection. (I guess this already kinda implemented since 3.1)


    P.S. As I mentioned above I know that since 3.1 there is a light version of "developers tools" but it's not nearly as efficient . It just saves you from gziping. It doesn't add the possibility to create package skeleton files trough the admin ACP. WotLab evolves every day, so I assume this will be eventually implemented . Sooner or later, because it would make suite more attractive from the dev point of view, which obviously means more modules, more apps, more goodness.:):love:

  • While I agree on some points, remember that dev tools already exist in the ACP (although I haven't checked them out extensively).



    But

    This is what I miss in Woltlab so much.. If you at least allow to use file system without gziping or putting anything in tar while in dev mode it would simply things in a long run, because now to test a change you have to actually pack everything into multiple archives within tar/gzip and then reinstall/update the application. It's just a pure overkill.

    this is not necessary. You only need to re-install your application when you have changed am XML-PIP. I have a skeleton package which I simply copy and replace the package identifier . Then I comment/uncomment all relevant PIPs. Then I install the package *once*. All subsequent changes are done in the file system, and changes o the PIPs are done in the database directly. I then just put the changes in the XML files as well.


    Once I have finished a certain set of features I re-install the package *once* to make sure I haven't botched the XML files. And that is it. I certainly don't constantly install the package new. That would be extremely wasteful and annoying.


    With the new dev tools, I suppose this works a lot easier, but I haven#t really worked with them.



    Still, some features are needed. I really like composer bin/console make:controller in symfony, for example :D

    "A life is like a garden. Perfect moments can be had, but not preserved, except in memory. LLAP" — Leonard Nimoy

  • I simply copy and replace the package identifier . Then I comment/uncomment all relevant PIPs. Then I install the package *once*. All subsequent changes are done in the file system, and changes o the PIPs are done in the database directly. I then just put the changes in the XML files as well.

    Why I never thought of doing that. Thanks for sharing. It's a good hack to avoid gziping.

    Well, the Dev tools allow you currently to simply sync your dev folder with your installation, but requires to manually write the xml files.

    Yeah, as I mentioned before current Dev current tools partially solves update issues while in developer mode. But that's not what I'm requesting. It's the first paragraph that you should pay attention. Skeleton file generation with proper namespaces predefined. It could be done in two ways, you could create all of the module files, hooks xmls trough ACP by using html forms and ajax submission or by php command line pretty much like composer which is exactly what Netzwerg wants as well.


    Rough example of how it could be done with PHP console:

    PHP
    1. php wbbdev make:controller packagename filename
    2. php wbbdev make:langxml packagename language code
    3. php wbbdev make:templatehook packagename filename
  • back in the days, there was a 3rd party dev tool that allowed exporting database entires to XML. You could simply define everything in the database (e.g. menu entires etc) and then when you were done, export it and get well-defined XML files. It also had a GUI for creating a lot of stuff in the ACP so that you did not need to modify the database directly.


    Getting that functionality back would also be great.


    I'm not dead set on CLI skeleton file generation. If it was possible to generate skeleton files in the ACP it would be sufficient for me.

    "A life is like a garden. Perfect moments can be had, but not preserved, except in memory. LLAP" — Leonard Nimoy

  • If it was possible to generate skeleton files in the ACP it would be sufficient for me.

    Some of other frameworks have this implemented. I see no reason why woltlab couldn't if they wanted.


    Let's take IPS framework language XML as an example . The normal behaviour is to install app which uses XML files in order to import language strings to the database and load it from there while page is being processed(woltlab does that too), it is how most systems works.

    If dev mode is turned on, then ips system loads everything from a lang.php files instead of database entries, which is a simple array. Yes, all you have to do as dev is to add array key and assign a value to it and it works out of the blue anywhere on the system or in the module you develop. This is so fast and efficient. Same with jslang.php, plus they get merged into one xml file on compilation for production; if its js it has xml flag of js=1. So while developing your custom translations you don't deal with database entries at all, nor with XML, just a plain good array. So if to do something along those lines you don't need XML skeleton generation for language files at all because defining array takes so little of the time its not even worth making a skeleton, it would be just an overkill. If it's strictly XML based then skeleton is needed. Like you add a keys and assign the values trough the html form and then system generates the XML for you. Doing it trough array is faster than using ACP I think, unless you use ajax so you only to press one button to add a XML value.




    As for sql queries skeleton generation they have them form/ajax based, you can also add indexes,keys and everything trough there(kinda remains me of simplified phpmyadmin) even though it's only for creating tables that new app/plugin will use. To UPDATE or modify already exiting system tables you still have to use normal queries(like alter table and etc) even though they are doing it using their php library so it's not .slq file based like woltlab.


    And don't get me wrong I'm not saying that things should done one way or another or that wotlab should do what ips does. By any means, no :) I'm just showing what approaches exist in the market.


    To sum up, in my opinion language needs skeleton generation only if it remains as xml all the time because it might get slightly tedious.

    MySQL queries may remain the same. I personally have no problem doing it trough pure .sql, but I guess adding them trough ACP is more 'noob' friendly.

    Modules,Controllers,Pages,Form and hooks must have skeleton generation for sure and correct name spacing in them. That would save so much of our time.

  • I see no reason why woltlab couldn't if they wanted.

    Thats the big point. Being developer friendly has sadly never been WoltLabs strong suit (just look at the current documentation, which is better then before, but still leaves much to be desired).


    I mean the current dev tools have so much shortcomings.... For example, you can sync, but you can not generate a package. WCF has a TarWriter, so it should be easy to add a button "generate package" that does this job for the dev... and so on.

    "A life is like a garden. Perfect moments can be had, but not preserved, except in memory. LLAP" — Leonard Nimoy