Unifiedtransform icon indicating copy to clipboard operation
Unifiedtransform copied to clipboard

not merge this is a proposal

Open JuanVqz opened this issue 6 years ago • 11 comments

I think the idea of keeping everything in a view is very good because it is more user friendly, however it is difficult to do tests, I think it would be better to design, follow the CRUD convention.

I mention it to continue doing the tests

what do you think?

JuanVqz avatar Apr 12 '19 19:04 JuanVqz

Yes we have to follow CRUD convention, it will make the code more readable, but all these will do a major change in, so it's the perfect time to do this. Once we are in stable mode, these type of major changes will be a bit tedious.

anishojha avatar Apr 13 '19 02:04 anishojha

I will create a new dev branch to push any new changes before merging on Master branch.

We need to follow 1 step at a time for this big refactoring. What do you think?

changeweb avatar Apr 13 '19 02:04 changeweb

@changeweb yes it's the perfect way. step at a time, what would you think is the easiest first step?

JuanVqz avatar Apr 13 '19 05:04 JuanVqz

We should do something like this: Make all changes for a page. Example: Update everything with the change we want. Like:

  1. Edit url in a single page views and Form method to reflect CRUD.
  2. Update the url with the edited url in page views in routes/web.php with new route name e.g.: resource() to reflect CRUD.
  3. Update associated controller methods with the CRUD.
  4. Write Feature test for the page.

changeweb avatar Apr 13 '19 07:04 changeweb

@changeweb today I have time if you can create a new branch, I'll start like you told.

JuanVqz avatar Apr 13 '19 13:04 JuanVqz

@JuanVqz ok I'm creating one

changeweb avatar Apr 13 '19 14:04 changeweb

@JuanVqz dev_for_new_features branch is created.

changeweb avatar Apr 13 '19 14:04 changeweb

@changeweb sorry for many problems.

We should set the format of the name of the style attributes, I think it's easier to read with the case of the snake, for example, rowNo to row_no We should use route than url helper

I think we can follow this guide

or maybe all guide naming conventions

I don't like this format maybe only in classes it's good.

public function foo()
{
  //
}

I'm like this format

public function foo() {
  //
}

but you should set the format...

JuanVqz avatar Apr 14 '19 03:04 JuanVqz

I try to use snake case for variable name and camel case for function name. I also prefer 2nd format you liked. But some of the code are in 1st format because they were auto generated.

Some variable names got camel cased because I read an article about snake case vs camel case and wanted to see how it looks when implemented. But I got lazy to update them later. Sorry.

changeweb avatar Apr 14 '19 03:04 changeweb

@JuanVqz @changeweb

Laravel follows the PSR-2 coding standard and the PSR-4 autoloading standard. Check this link Laravel Coding Style

These are PHP Coding Standard, so we should stick to them

anishojha avatar Apr 14 '19 11:04 anishojha

sorry typo. I meant to reference 192 not 92

Soneji avatar Aug 19 '19 18:08 Soneji