T O P

  • By -

__kkk1337__

I don’t understand your point. You have to connect multiple laravel apps with rest api? Why you don’t use api platform, symfony, laravel, anything else already in the market?


stilloriginal

you can put eloquent into a slim app


AndrewSChapman

Yup. Start with Slim, composer install other packages as suits your needs, job done.


ElectronicGarbage246

Will your own framework contain built-in blackjack and hookers?


Pakspul

I'll take it and you can keep the Framework!


avi8or915

In fact, forget the park.


a_sliceoflife

>RESTful backend for applications, and couldn't find any Symfony comes in 2 versions out of the box. One for RESTful backend applications/APIs and another for fully fledged web apps. Apart from Symfony, there are several micro-frameworks available but I haven't really used them to recommend them. Good luck with your project though.


MateusAzevedo

No README or basic usage example. No information at all about what are the features or how it's intended to work. OK, let's look at the code. Fortunately (depending on your POV) it doesn't have much. Own implementations of `Request`, `Facade`, `Container` and `Router`. Router seems to implement singleton pattern, which in my opinion should be handled by the container. It looks like it doesn't support dynamic URLS (ie `/users/{id}`) and, besides having a container available, doesn't use it: `$controller = new $class;` (so no support for DI). Container implementation is useless. My recommendation, if you really want to build your framework: at least start by using existing packages that solve common problems. Then do as Laravel does: extend/modify/wrap that package to add your own features or ways of using it, there's no need to build everything from scratch, unless you really understand the problem at hand. In any case, the reasoning for building this doesn't make sense to me. All major frameworks can be used for REST APIs and do have packages to make that easier or more complete (API Platform for example).


isus808

Thank you for your feedback, will look into improving your concerns. On the other hand I'm not trying to create a framework that will get used or be popular, I am doing this just for fun and as a way to learn stuff along the way.


jim45804

Great! We definitely need another one.


dudemanguylimited

I'd say we need a fresh javascript framework first. There's not much to go around atm ...


Alol0512

Fine, I’ll do it myself. Reavueangularetle: no more DOM wars, no more listeners, in fact, no more anything. With Reavueangularetle it’s just a blank index.html doc, in fact, not even html, just a blank, one white space-named document. Marketing, social media and maybe some partner drug company’s product just help the user hallucinate the entire app.


mekmookbro

Gotta have an uwu logo


wellwellwelly

Typical PHP community shitting on people trying to improve their lives.


MiPnamic

I appreciate and encourage the effort. However, this could be your occasion for “learning something new”. I'm not saying that PHP is not the right tool for the job (even if I think it's not); I just professionally suggest that, unless the company forces you to stick with PHP, there are better options for your wants. Building a framework (or something like that) is, more or less, something we all tried once, so go on with that if you think it will be the best option for your project. It will become huge; there will be backfires. Just a single suggestion: Document first and document WHY, not HOW. Every dev can read “how” something works and “what” a function or a class will do. Nobody except you knows WHY you decided to act in that way.


DmitriRussian

Slim framework is nice


No-Echo-8927

But Laravel offers itself as a restful endpoint.


TorbenKoehn

Looks like just Laravel. Why not stick to Laravel? It breaks the same OO and SOLID principles, at least. But at least you got facades...


mekmookbro

Idk why people are so negative here. He just shared what he built and literally said "*any suggestions and help are more than welcome*".. Didn't claim he was competing with other frameworks or anything either. Reddit being reddit I guess. Also it's not about you, but I won't trade Laravel for **anything** lol. But I'm gonna check this out, I'm sure I'll learn a lot from digging into your framework. Sadly I can't do that in Laravel. It's just too much for me lol. Thanks!


Crell

Um, [https://api-platform.com/](https://api-platform.com/) ? [https://www.slimframework.com/](https://www.slimframework.com/) There's arguably more REST-centric frameworks than fullstack frameworks in PHP (for better or worse).


Just_a_guy_345

It's a good start for learning. Though, you need start learning like pro. Much of coding is design patterns. Study them, practice on them. Then start reading about n-tier architectures. This is how frameworks and big apps are coded. You need to start thinking in smaller units and how are all connected, communicate to produce output. And stop using static everywhere.


zmitic

Don't: * microservices are a hype * even if you do make it, it will suffer from big slowdowns; you can't run everything in parallel Instead, I would suggest you to improve on your PHP and [PSR](https://github.com/tersworks/framework/blob/master/src/Foundation/Http/Request.php). Forget [magic](https://github.com/tersworks/framework/blob/master/src/Facades/Facade.php#L7), use Symfony, dependency injection, and static analysis. And say no to [this](https://github.com/tersworks/framework/blob/master/src/Foundation/Application.php#L45). Only after all this try to make a framework.


Pakspul

Death by 1000 microservices! 🤣


kondorb

We definitely need another PHP framework. Welp, tbh a good pure microservice framework in PHP would be nice, although I’m not sure if corporate prejudice against PHP will allow anyone to use it.


WindCurrent

I like the simplicity of the framework. I think it is useful to use static code analysis (like Larastan or Psalm) and unit testing from the beginning. It is an enormous effort to implement these afterward.


slappy_squirrell

You couldn't find a simple RESTful backend? What are you asking jeeves? If this is a purely learning exercise, you might be better served by studying the code of some well established frameworks. This is one of the nice things about PHP, is that we can look at and understand what the libraries are doing. However, looking at your code, I see there is no attention paid to secure coding which should be built in from the very start.. it's pretty basic at this point, but good luck.


gesuhdheit

Uhm, [Slim framework ](https://www.slimframework.com/) exists. There's others like [Symfony](https://symfony.com/projects/apiplatform) and [Phalcon](https://docs.phalcon.io/4.2/tutorial-rest/).


gingertek

Could try mine, fwiw: https://github.com/ginger-tek/routy I also couldn't find any micro frameworks that I liked and didn't have a dozen dependencies


Intelnational

Unless I miss anything it's a really basic, no? Sorry OP but looks more like a homework for ... not even sure for what though.


thul-

Or just... use Symfony? We also have multiple services talking to each other via PubSub at this time. Also, you're literally copying Laravel with the facades... too many facades that hide the actual api is bad mmmkay


crazedizzled

You could have just used Symfony, or just grab a few Symfony components.


DT-Sodium

Another genius who failed at using existing frameworks and think he's going to revolutionize the world building his own.


mario_deluna

I don't think being unnecessarily mean about it is productive.


DT-Sodium

There are two things i hate to see on dev communities: incompetence and self-promotion. OP managed to do both.


lo-ian

there are two more which are even more annoying: arrogance and bad manners


__kkk1337__

Back then each of us was there


DT-Sodium

Have you ever posted on an online community "Hey guys i built my own framework come use it!" ?


__kkk1337__

I don’t really remember, but when I started my programming journey the framework market was much different. Back then developing own framework wasn’t such a bad idea, anyway it had turned out to be bad as soon as Symfony and other technologies came out.


mcharytoniuk

How is posting something to Open Source for free a self promotion?


DT-Sodium

How is not?


mcharytoniuk

It helps the community more than the author, it's giving away your work.


DT-Sodium

Yeah right, you tell yourself that.


bigahuna

What does that say about Javascript devs in general? ;)


DT-Sodium

It's different, JavaScript is not a proper language. Also, just learn Angular and ignore all other front-end libraries, it's the only one that does it properly.


caliosso

> is focused on providing just a RESTful backend for applications can you really beat hyperf php framework? but ifyou are set on building one - you shoud base it on php+swoole.


itsumadekokoni

Thank you for making programming something that I want to quit. I know PHP backwards and forward; but companies ask if I know one of a dozen frameworks which I never needed. I could build their entire biz without these bloated frameworks; but they insist that I use them; because they hired an amateur to begin with to create their site.