Jump to content

Development Improvement and my wishes


Ali Majrashi

Recommended Posts

Hello,

IPS great and include nice GUI to help developer to create nice apps but it would be flexible, powerful and easy if we can have some tools and few things simplified for developments 

Developer CLI

can we please have developer cli something like https://github.com/symfony/console and include handful command something like

  • generate development files from apps or plugin (rather than uploading new dev folder with each release just update the CLI when needed and make it available in the Marketplace)
  • create new app or plugin
  • generate template files
  • generate controller or in IPS called modules (front-admin)
  • generate models in the source folder 
  • generating database schema files or install files or upgrade files
  • allow developer to extend the CLI to include their command can be shared in marketplace
  • etc

Simplify Controller

can we please have one basecontroller to extend and if we need specific feature we can implement them what i see now we got (content controller and node controller and dispatcher controller) and for beginner it's confusing.

Generalize and  Simplify Model

like controller can we have one base model to extend if we need specific feature we can implement them now we got Node Model that extend ActiveRecord and Content Model that also extend ActiveRecord and we also have Content Item Model that extend Content Model all node things are confusing for developers coming from other framework and can easily replaced with more flexible and powerful relationship like Eloquent Model in laravel https://laravel.com/docs/5.2/eloquent-relationships

i know we can not compare IPS with other General Development Framework but they are easy to understand and easy to work with yet they got powerful features and with IPS4 we got promised that we will get modern framework 

Autoloading 

can you please consider removing underscore in front of classes name so our IDE can start supporting them without using alias class out of the box

Third Party Packages

when creating app or plugin can you make folder for JS third party packages that we can easily use

the same goes for php it's not clear where to put them and autoload them 

Composer

maybe this is too much to ask now but it is the most powerful thing to support specially for development for example when i create app or plugin i can require all third-party dependencies i need and easily install them and use them for productions or development environments and easily auto-loaded for other apps or plugin if they require the same package.

Form Helpers

make all helpers work in both admin and front some classes work only in admin side like the matrix form helper or the dynamic chart helper

make it easy and straight forward to create custom form helper via plugins

improve how pages app handle Input Type so we can easily create custom form input and easily use it in ip.pages

Developer Portal

one of the most important part that alwyes IPS delay implementing

for IPS to attract more developers they need full up to date documentation with upgrade changes and release note for developer and easily be accessed by everyone 

we used to have documentation for v3 but when v4 was released all we got pdf file that explain the core things and never got updated to reflect the new changes or to point them out

also when IPS release documentation something like the       Documentation      they never mention the version number the docs based on and we can not see the old document for older version if they got updated all we need something detailed and easy to follow and versioned based with upgrade and release notes something like https://laravel.com/docs/5.2 as you can see they got docs for 5.2 and 5.1 and 5.0 and all old docs even the new docs for the master branch that still in development with upgrade guide so developer can always be ready when the branch hit production

i really love IPS and hope to see more improvements for developers and one day we can see it as one of the best framework out there and not only community script.

if you have more Dev improvement or wishes share them and sorry if i miss or misunderstood any thing in the IPS since we need dev-Docs ASAP

Link to comment
Share on other sites

1 hour ago, Ali Majrashi said:

can we please have developer cli something like https://github.com/symfony/console and include handful command something like

  • generate development files from apps or plugin (rather than uploading new dev folder with each release just update the CLI when needed and make it available in the Marketplace)
  • create new app or plugin
  • generate template files
  • generate controller or in IPS called modules (front-admin)
  • generate models in the source folder 
  • generating database schema files or install files or upgrade files
  • allow developer to extend the CLI to include their command can be shared in marketplace
  • etc

ACP works well enough though, and adding a CLI would be quite a lot of work for the IPS devs, for very little in return IMO. There is a marketplace plugin that allows you to generate dev files from the raw files.

1 hour ago, Ali Majrashi said:

Simplify Controller

can we please have one basecontroller to extend and if we need specific feature we can implement them what i see now we got (content controller and node controller and dispatcher controller) and for beginner it's confusing.

I'm not sure what you mean by this. There can't be one single base controller to override, because the whole point of the controller is that it is handling what is displayed for that particular page, so very little code will be replicated between controllers. The content and node controllers are just more complete bases for those specific tasks, but it doesn't make sense to remove them, because you can just use a standard controller if you like, it's just more work. The Dev Center in ACP can generate it for you anyway, IIRC.

1 hour ago, Ali Majrashi said:

Generalize and  Simplify Model

like controller can we have one base model to extend if we need specific feature we can implement them now we got Node Model that extend ActiveRecord and Content Model that also extend ActiveRecord and we also have Content Item Model that extend Content Model all node things are confusing for developers coming from other framework and can easily replaced with more flexible and powerful relationship like Eloquent Model in laravel https://laravel.com/docs/5.2/eloquent-relationships

i know we can not compare IPS with other General Development Framework but they are easy to understand and easy to work with yet they got powerful features and with IPS4 we got promised that we will get modern framework 

Again, each different class just adds boilerplate stuff for one specific task. You can use ActiveRecord for everything if you want, but all of the Content classes are designed to minimise the amount of code that you need to write by doing most of it for you.

1 hour ago, Ali Majrashi said:

Autoloading 

can you please consider removing underscore in front of classes name so our IDE can start supporting them without using alias class out of the box

Agreed, though at the moment the file is just included, and the class must have a different name to allow for hooking. There is a marketplace plugin to generate files that fix it though (it generates a load of classes that extend the underscored class).

1 hour ago, Ali Majrashi said:

Third Party Packages

when creating app or plugin can you make folder for JS third party packages that we can easily use

the same goes for php it's not clear where to put them and autoload them 

You can just put them with the normal files - there's no need for them to be treated any differently.

1 hour ago, Ali Majrashi said:

Composer

maybe this is too much to ask now but it is the most powerful thing to support specially for development for example when i create app or plugin i can require all third-party dependencies i need and easily install them and use them for productions or development environments and easily auto-loaded for other apps or plugin if they require the same package.

+1 That would be really nice.

1 hour ago, Ali Majrashi said:

Form Helpers

make all helpers work in both admin and front some classes work only in admin side like the matrix form helper or the dynamic chart helper

make it easy and straight forward to create custom form helper via plugins

improve how pages app handle Input Type so we can easily create custom form input and easily use it in ip.pages

Yeah, it is annoying when some things only work in one location (especially tables requiring the admin table just to get a regular table on the front end).

1 hour ago, Ali Majrashi said:

Developer Portal

one of the most important part that alwyes IPS delay implementing

for IPS to attract more developers they need full up to date documentation with upgrade changes and release note for developer and easily be accessed by everyone 

we used to have documentation for v3 but when v4 was released all we got pdf file that explain the core things and never got updated to reflect the new changes or to point them out

also when IPS release documentation something like the       Documentation      they never mention the version number the docs based on and we can not see the old document for older version if they got updated all we need something detailed and easy to follow and versioned based with upgrade and release notes something like https://laravel.com/docs/5.2 as you can see they got docs for 5.2 and 5.1 and 5.0 and all old docs even the new docs for the master branch that still in development with upgrade guide so developer can always be ready when the branch hit production

i really love IPS and hope to see more improvements for developers and one day we can see it as one of the best framework out there and not only community script.

if you have more Dev improvement or wishes share them and sorry if i miss or misunderstood any thing in the IPS since we need dev-Docs ASAP

Yeah the docs seem to only cover some things, and basically assume that you can read the core files and figure the rest out. Once you've got used to the suite, it's OK, but for beginners some more docs would be really useful.

Link to comment
Share on other sites

4 hours ago, Colonel_mortis said:

ACP works well enough though, and adding a CLI would be quite a lot of work for the IPS devs, for very little in return IMO. There is a marketplace plugin that allows you to generate dev files from the raw files.

i love the ACP part but when i'm in my IDE i really hate leaving and go to ACP just to create front or admin module or create new DB table or modify one etc. CLI can speed things up yah it is quite work for IPS team at first for the first release but updating it will require less time and such tools can save alot of development time 

i'm aware of the marketplace generator for the alias classes and dev folders but it would be awesome if it's maintained and developed by IPS and other Devs can create their own command based on it to ease their live when working with IPS code

4 hours ago, Colonel_mortis said:

I'm not sure what you mean by this. There can't be one single base controller to override, because the whole point of the controller is that it is handling what is displayed for that particular page, so very little code will be replicated between controllers. The content and node controllers are just more complete bases for those specific tasks, but it doesn't make sense to remove them, because you can just use a standard controller if you like, it's just more work. The Dev Center in ACP can generate it for you anyway, IIRC.

4 hours ago, Colonel_mortis said:

Again, each different class just adds boilerplate stuff for one specific task. You can use ActiveRecord for everything if you want, but all of the Content classes are designed to minimise the amount of code that you need to write by doing most of it for you.

base model or controller dose not mean removing everything but simplify it IPS can split content and node controller into smaller specific classes that you can implement in your controller the more you implement the more feature you can have without duplicating your code by implementing Dependency injection or Service providers in the framework like other framework do

5 hours ago, Colonel_mortis said:

You can just put them with the normal files - there's no need for them to be treated any differently.

the js third-party files form what i understand need to be placed in the interface folder in your app or you can not use them and recently the staff advise not to do so unless i'm missing something

 

Link to comment
Share on other sites

6 hours ago, Ali Majrashi said:

base model or controller dose not mean removing everything but simplify it IPS can split content and node controller into smaller specific classes that you can implement in your controller the more you implement the more feature you can have without duplicating your code by implementing Dependency injection or Service providers in the framework like other framework do

I think it would be more helpful if you included a specific example of where the base classes didn't work for you, because in my experience the selection that they already has works well - if you are handling content, there are premade classes that do pretty much everything that you want, but if not then there's very little code that you would want to reuse.

6 hours ago, Ali Majrashi said:

the js third-party files form what i understand need to be placed in the interface folder in your app or you can not use them and recently the staff advise not to do so unless i'm missing something

In core, the 3rd party JS is in the interface, but IPS have said that they don't recommend that, and that you should instead put it with your other JS, so it gets minified and bundled with everything else.

6 hours ago, Ali Majrashi said:

i love the ACP part but when i'm in my IDE i really hate leaving and go to ACP just to create front or admin module or create new DB table or modify one etc. CLI can speed things up yah it is quite work for IPS team at first for the first release but updating it will require less time and such tools can save alot of development time 

i'm aware of the marketplace generator for the alias classes and dev folders but it would be awesome if it's maintained and developed by IPS and other Devs can create their own command based on it to ease their live when working with IPS code

Personally, when I develop for IPS I don't even have a command line open, because there's no need, but maybe I'm in the minority there. There's nothing stopping you from making a simple interface though.

Link to comment
Share on other sites

Hi @Ali Majrashi,

 

Developer CLI

Since IPS4, unlike a standalone framework, actually has a GUI, it generally makes sense to put these things in the developer center. Almost all of the things you mention are already covered there. I think very few people would actually use a CLI tool.

I would like to have a more sensible way of distributing the developer files too though - it's on my list ;) 

 

Simplify Controller / Generalize and Simplify Model

I think I see what you're getting at. Technically \IPS\Dispatcher\Controller is the base controller, and \IPS\Patterns\ActiveRecord is the base model, and it will remain this way, but in some cases it makes more sense to allow more of a mix-and-match - for example, in Content items. We have been limited a bit in the design patterns we can employ here due to PHP not allowing multiple inheritance, but this has changed since traits in PHP 5.4, and refactoring some of our more complicated code to utilize this to make more sense is definitely something I would like to do.

 

Autoloading

Sorry, no - it's needed for hooks ^_^ I think most of our devs use the tool @Colonel_mortis mentioned to fix automcompleting in their IDE. 

 

Third Party Packages

Put them anywhere you like :p  I recommend in the main dev/js rather than interface so they get stored according to the admin's wishes - wish is something we're intending to transition to.

 

Composer

We've never really considered using Composer. I don't particularly have any thoughts either way.

 

Form Helpers

Yes, you're right. This is something I would like to do.

 

Developer Portal

This is something we are planning.

Link to comment
Share on other sites

Hi @Mark thank you for your replay one more wish i hope we have in IPS Framework 

can we also have easy, fluent and flexible query builder that we can easily use with models or general DB query 

example from laravel query builder https://laravel.com/docs/5.2/queries#introduction

$users = DB::table('users')
                ->where('votes', '>=', 100)
                ->get();

$users = DB::table('users')
                ->where('votes', '<>', 100)
                ->get();

$users = DB::table('users')
                ->where('name', 'like', 'T%')
                ->get();

Model example

$flights = App\Flight::where('active', 1)
               ->orderBy('name', 'desc')
               ->take(10)
               ->get();

they are easy to understand and work with you can chain as many methods as you want (specially all where methods) and execute it with the (get, all or first methods) and all models will have access to all methods to retrieve the desired results

i think with rich and fluent query builder IPS team can save alot of time when dealing with models or DB query in all apps also maintenance and development will be easier and enjoyable

Link to comment
Share on other sites

It is my intention to make especially where clauses a bit easier to understand. We already have a first() method and calling a specific get() or all() method is not necessary as the query object itself is an iterator.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...