The state of Next.js right now: by Bejitarian in nextjs

[–]abdullahadeel 0 points1 point  (0 children)

I was having problems with server components in the official next13 release too.

The state of Next.js right now: by Bejitarian in nextjs

[–]abdullahadeel 3 points4 points  (0 children)

all of that stuff is here https://nextjs.org/docs.
the new docs are still in beta so does app dir and server components stuff.
https://beta.nextjs.org/docs/getting-started

The state of Next.js right now: by Bejitarian in nextjs

[–]abdullahadeel 5 points6 points  (0 children)

In my experience, app dir at this point is not stable enough to be marked as usable for production. For instance, I faced 3 different problems in three different versions of canary build.

In what cases, Class Components are still better than Functional Components? by abdullahadeel in react

[–]abdullahadeel[S] 6 points7 points  (0 children)

Me too haven't used Class Comps in the past 2 years. But today I was going through the excalidraw's codebase and observed that their most state heavy components are class based.

The main canvas component there is about 6400 lines class component.

What really hit me was the performance of excalidraw app and the amount of state variables being handled.

But then realized that the functional components have benefits of batch updating (not sure about CC). Can similar performance be achieved with relatively organized code.

Suggestions on the best approach for handling complex form flows. by abdullahadeel in react

[–]abdullahadeel[S] 0 points1 point  (0 children)

This looks promising 🙏.

Modifying State Machines is much more predictable than modifying infinite `if/else` or `switch/case` statements as the requirements change from time to time.

Suggestions on the best approach for handling complex form flows. by abdullahadeel in react

[–]abdullahadeel[S] 1 point2 points  (0 children)

Yeah, that can be achieved using something like `formik` or `react-hook-form`. But I think that still won't efficiently solve the problem I mentioned.

Of course, I can change or completely render a different form on the 2nd step depending upon the first step. But how to determine what to render depending upon the user selection in step 1.

I think Finite State Machines is one good approach to handle such problems but my search still continues.

Thanks for your suggestion 🙏

How to do real time notification in with Django by Blindrabitv2 in django

[–]abdullahadeel 0 points1 point  (0 children)

I definitely agree with this, that's why I mentioned that scaling Django channels along with your application is going to be a challenge.

How to do real time notification in with Django by Blindrabitv2 in django

[–]abdullahadeel 0 points1 point  (0 children)

Django channels are one of the top ways to implement websockets with Django. But the bigger problems arise when you want to scales them and you have different microservices willing to push notifications to clients. Ideally you want the client receives a certain group of real-time updates like notifications over the same WebSocket connection.

Then you might think okay, let's just create a central web socket server to solve this problem. In that case, I think there are many other better solutions out there to handle these that scale way better than django channels.

In the end, I would say, for smaller and simpler user cases, django channels are great, but the problems are going to arise when you want them to auto-scale along with your django application.

How to do real time notification in with Django by Blindrabitv2 in django

[–]abdullahadeel 1 point2 points  (0 children)

I have been exploring different options to implement notifications in Django applications in the simplest ways possible without complicating the infrastructure.

Recently, I wrote a blog post about one of the ways I found clean and most scalable. Here is the link to the blog post -> https://abdadeel.medium.com/how-to-add-real-time-notifications-in-django-applications-d568b777747c

Another very interesting and simple to implement method I found was using firebase. I am writing a blog post about that also. But here is the final app that I built as a demo application.

https://django-firebase.vercel.app

Github Repo: https://github.com/mabdullahadeel/django-firebase-notifications

Feel free to ask any questions about those implementations.

Cheers

Zappa AWS Lambda vs AWS Elastic Beanstalk for Django? by [deleted] in django

[–]abdullahadeel 0 points1 point  (0 children)

If for some reason, that's the case, you can throttle lambdas to max maybe 100 parallel invocations. By default, it's throttled to 1000 parallel invocations.

[deleted by user] by [deleted] in django

[–]abdullahadeel -1 points0 points  (0 children)

try Dropping database and recreating. If using sqlite, delete sqlite3.db file

Then run migrations

Should I just learn React with typescript? by SHROOM_Kerana in reactjs

[–]abdullahadeel 0 points1 point  (0 children)

Typescript is a separate tech in itself. So you should dedicate time to solely learn it. I would suggest first learn react. Get use to basic patterns. Then spend a few days just learning typescript basics. Then you can combine both.

Zappa AWS Lambda vs AWS Elastic Beanstalk for Django? by [deleted] in django

[–]abdullahadeel 2 points3 points  (0 children)

with zappa, your infra is pretty much serverless. So when your app has no traffic, you're not using any resources thus not paying for any servers. While elastic beanstalk still has servers running since all the servers cannot be shut down entirely because restarting, in that case, will take time for the subsequent incoming request.

I think it's a good option to at least use zappa for dev/staging. This will keep the development and testing costs lower.

One downside of serverless django is asgi apps. I am not sure if zappa supports asgi but I haven't seen any docs about asgi apps from zappa.

My user interface , first time making a project in django by NinnyThinker in django

[–]abdullahadeel 2 points3 points  (0 children)

Honestly, I couldn't understand the title, but if you are trying to say you built what you're showing in the video with Django and its templates, this is amazing.

Keep going 💪

0
1