简体   繁体   English

基于Web或基于PC的过程控制应用程序?

[英]Web-based or PC based for process control application?

I want to create a process control application. 我想创建一个过程控制应用程序。 Events update the database and that should be reflected on the GUI. 事件会更新数据库,并且应该在GUI上反映出来。

Although I personally prefer Linux, the hard fact it that 100% of the potential customers I can imagine run Windows. 尽管我个人更喜欢Linux,但令人难以置信的事实是,我可以想象的100%的潜在客户都在使用Windows。

  • Ok, for Windows I am comfortable with C++ Builder. 好的,对于Windows,我对C ++ Builder很满意。
  • I suppose I could switch to NetBeans and use Java just in case someone ever wants it cross-platform. 我想我可以切换到NetBeans并使用Java,以防万一有人希望它跨平台。
  • browser based is probably the easiest way to cross-platform (barring some disagreements between browsers). 基于浏览器可能是跨平台的最简单方法(除非浏览器之间存在某些分歧)。

The thing about browser-based is I am not sure how to implement it. 基于浏览器的问题是我不确定如何实现它。 Would I auto-refresh the page every second or so? 我会每秒钟左右自动刷新页面吗? Can a database change be propagated upwards via PHP and refresh the screen? 是否可以通过PHP向上传播数据库更改并刷新屏幕? A very basic question, but I am new to this sort of thing, coming from an embedded background. 一个非常基本的问题,但是对于这种事情我是陌生的,来自嵌入式背景。

If all else is equal, which is easier for me to implement and maintain? 如果其他所有条件都相同,那么对我来说更容易实现和维护?

If it's real-time control, and you have to respond within a very narrow time band, then web based and Java based probably won't do it. 如果是实时控制,并且您必须在非常短的时间内做出响应,那么基于Web和基于Java的应用程序可能就不会这样做。 If it's real-time control problem you ought to look elsewhere for a solution. 如果是实时控制问题,则应在其他地方寻求解决方案。

You can certainly use the web, Java and PHP to display results as they are produced, but the actual control and persistence to a database should be done with different technology. 您当然可以使用Web,Java和PHP在生成结果时显示结果,但是对数据库的实际控制和持久性应该使用不同的技术来完成。

I'd also be careful about writing to a database. 对于写入数据库,我也要小心。 It should be an asynchronous, "write behind" capability rather than the naive, "connect to a relational database and do an INSERT" sort of thing. 它应该是异步的,“后写”功能,而不是幼稚的“连接到关系数据库并执行INSERT”操作。 I think that will be too slow. 我认为那太慢了。

If it is desired to be multiuser apllication I prefer web applications. 如果希望成为多用户应用程序,我更喜欢Web应用程序。 Easy to make changes, easy to deploy. 易于进行更改,易于部署。 No problem with firewall settings and etc. 防火墙设置等没有问题。

About propagation of changes from server to client. 关于从服务器到客户端的更改传播。 No way. 没门。 But you can utilize AJAX tu "ping" on server and checking if somethink is changed. 但是您可以在服务器上利用AJAX tu“ ping”并检查某些想法是否已更改。 And if somethink is changed then load id and change view. 如果更改了某些方法,则加载id并更改视图。 Facebook/Google use somethink like this for chat/googletalk and so on. Facebook / Google在聊天/ googletalk等方面使用这种想法。

About browser differencies. 关于浏览器差异。 You can use CSS framework, JavaScript framework and most of problems with diferencies between browsers are solved. 您可以使用CSS框架,JavaScript框架,并且浏览器之间存在差异的大多数问题都已解决。

Edit: If it is about seconds I think that PHP, Python or somethink really easy and fast is good part on server side. 编辑:如果大约几秒钟,我认为PHP,Python或某些真正简单快捷的方法在服务器端很重要。 Or C++ CGI module. 或C ++ CGI模块。 And on database side SQLite. 并在数据库端使用SQLite。 Lightweight and fast solution for not much complex data. 轻量级且快速的解决方案,用于处理不太复杂的数据。 ANd not to big amount of data. 并没有大量的数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM