Custom Backend Code
Hello,
If I wanted to have a custom website with a user interface and database or other custom on page calculators, etc., would Javascript be used for that? Or would that be done in PHP?
I am just looking to understand if the Duda platform can be used for a custom web application OR if I need to just start from scratch (without Duda) and roll with something like Angular, etc. I understand if this sounds like a dumb question. Just trying understand the capabilities of the platform for customization.
Thanks
Best Answer
-
Hey Rene! Duda is really meant as a static site builder if you're just using the platform itself. That said, if you're a developer, you can get creative and really do whatever you need to with Duda. Regarding the calculator example, you can build a custom widget to handle that type of functionality. You'd need to handle your own 'state' for the calculations and would need to persist it to your own database with HTTP requests if you were trying to store the data though, or handle the requests to send out an email etc.
I use Google Cloud Functions from custom widgets to do some extra computations or to interact with external apps or databases for some widgets.
You can also trigger your own code from form fills using the built-in webhook tool.
The widget builder will get you pretty far--Overall, the widget builder is an HTML, CSS, and JavaScript environment, so if you can handle some functionality with that, then you're able to get it onto the static Duda site. You can add any number of custom widgets to your account if you have an Agency plan or higher.
In terms of database, Duda doesn't have a built-in database on the site where you can add tables and data. You would have to store that on your own server or another tool. You can use the API in your own code flows to perform actions in your Duda account, and can use custom code or webhooks and other options to make the site interact with your external database or backend routing. Another option is the Duda membership tool, depending on what you need to achieve. https://support.duda.co/hc/en-us/articles/1500002714541-Add-Membership-Pages
You should also look into dynamic pages. I find I'm able to do a LOT of 'app like' stuff with dynamic custom widgets. https://support.duda.co/hc/en-us/articles/360060106674-Collections
Sooooo to answer your question, you can force Duda into a box to behave like an application in some regards, but it's not intended as an app builder. I recommend poking around the developer documentation and reading through the custom widget guide and collections API. And if you can describe in more detail what you're trying to build, we can give you more feedback on how you might be able to make it happen in Duda!
6
Answers
-
Thanks so much, Elizabeth! I have a customer looking to make a platform that has a mixture of a social and a gig site all in one. The first pass is more of an MVP. Specs are in progress. So I am looking to determine whether to go with Duda/widget, WordPress with plugins or just go the Angular route.
Your response is helpful towards making a decision.
Sincere thanks!
R
1 -
Hmm that's tricky. If you're trying to recreate something like Fiverr/Upwork, it might not be the best fit for Duda. That said, what would be a great fit is if that company grew and you needed a customizable page for each freelancer where they could buy a single page site from you hosted on Duda and make a subdomain etc. It might be possible with the membership feature depending on how robust you need features to be, but things like messaging and having customers set their own products etc would be tricky. But if you don't need to automate it you can look into some apps you can integrate that allow things like scheduling and use a filtering widget tool to at least showcase the members of your gig community and have them be easily searchable. So on that one I'd say it depends on your budget and if you really are trying to develop an app for your client, or just need to get the MVP and can scale back on some aspects to keep costs down.
0