Forum > Networking and Web Programming

Application like Spotify or Discord

(1/5) > >>

nicanor:
Actually I don't know if this make sense ... 
I want to create an application that looks and woks like Spotify ... But I don't want to make a music player or something like that... I just talk about the nature or structure of Spotify...
I was thinking that this kind of application runs in its "own browser"  maybe using something like CEF (Chromium Embedded Framework) ... Anyway ... Am i wrong about this? I mean ... can somebody put me on right direction?
For example: Can I use CEF4Delphi and Pas2Js together, to achieve success in create a client application that have its own interface, independent of firefox, chrome etc ... i.e. An application like discord or spotify? I believe this applications have a server site, a webserver or something...
I'm sorry if this appear strange... but I don't know the correct terminologies that we can use in this case.

Warfley:
Spotify, at least the desktop app (there is also the web app and the smart TV app and the mobile App, etc.) is based on CEF. But, the main reason for this is that in 2007/8 when it was released, there were no real alternatives to using browser interfaces for your application. But today there are many. You could use Electron, React Native, Cordova and many more. So you are free to choose. Pas2JS is a general Pascal to Javascript Transpiler and should work with all of those platforms.

If your application requires a backend (like Spotify to stream the music), you of course need to have some sort of Server. While native frameworks like Electron (which use nodejs rather than browser js) provide full access to the network stack and allow you to basically choose any protocol you want. If you are bound by more traditional web applications (i.e. those that should run also in a simple browser), you are restricted to only HTTP or Websocket traffic, where HTTP is a basic request response format (which none the less has been (ab)used for any kind of transmission, because transmitting kilobytes of data for a simple "OK" message is fun), while Websockets allows to send arbitrary messages in both directions at any time.

So there is a wide variety on technologies and protocols you could use. Without any more information on what you are trying to archive (which platforms you target, what kind of service you want to provide, etc). it is hard to give you any specific information

nicanor:
Thank you so much for the information... This already helps to start clearing the way!

I intend to build an operations management system to control projects and activities in the operations sector of a company.

Currently, we are even using Grafana to present dashboards, plot graphs and present indicators. But I just want to implement my system based on this idea.

For that I get the data in a database of an old system that we have running here... (made in delphi7)... but I need to evolve from this old technology... to effectively create a new application.

That is, the face of the system will be based on dashboards presenting synthetic data, graphs and indicators of production and project status, activities in progress and the results of the operations sector.

I will implement interfaces for engineers and technicians to register, update and monitor projects in progress, appointments, schedules and tasks in progress... In the end we will have a mix of "project manager and productivity control".. .only functional and specific to our case.

I intend to store the data (the CRUD of this system (I'm thinking this would be the server side)) using Firebird or Postgres. And I want to apply what I've been learning, evolving and practicing for a few years in terms of Clean Architecture, SOLID, DDD, TDD development best practices.

nicanor:
I work with pascal and want to continue in that line.
The problem is that I'm kind of lost among the various possibilities for web available on lazarus... We have weblaz, CEF4Delphi, Pas2JS, fastplaz...
I follow the forums where people defend the advantages of use fastCGI ...  :) ...
At the end of the day, there's a lot of information and a lot of opinion and we don't have a place to start... and without a clear idea of how to structure all this knowledge and effectively be able to use it objectively...
Sorry... this has nothing to do with the case...
I'm just explaining this with the intention that someone more experienced can point me in the right direction..or at least in the best possible direction...
Thank you very much!

PierceNg:

--- Quote from: nicanor on March 28, 2022, 09:44:56 pm ---I was thinking that this kind of application runs in its "own browser"  maybe using something like CEF (Chromium Embedded Framework) ... Anyway ... Am i wrong about this? I mean ... can somebody put me on right direction?
For example: Can I use CEF4Delphi and Pas2Js together, to achieve success in create a client application that have its own interface, independent of firefox, chrome etc ... i.e. An application like discord or spotify? I believe this applications have a server site, a webserver or something...
I'm sorry if this appear strange... but I don't know the correct terminologies that we can use in this case.

--- End quote ---

Take a look at fpwebview - an FPC binding for Webview, which is a tiny cross-platform library for building modern cross-platform GUIs using web technology. Webview uses GTK WebKit, Cocoa WebKit and MS WebView2 on Linux, macOS and Windows respectively.

There is an example implementing an embedded web server (using fcl-web), demonstrating two-way communication between Javascript and Pascal.

Various possibilities to realize your use case:

* use pas2js for the front end
* maybe in combination with WebAssembly
* instead of embedded web server, your front end talks to your real server
* your front end talks to embedded server, which then talks to real server
* etc

Navigation

[0] Message Index

[#] Next page

Go to full version