Is it possible to build Wix/Wix# UI with MVVM? - forms

I am currently reading into building a custom UI using Wix#, but since I have more experience with (WPF) MVVM than with WinForms i was wondering if it was possible to use that instead.
Is it possible?

You can actually use WPF UI with Wix#. See example in wix# repo.
If you want to use WinForms mandatory, you can also try to utilize winforms bindings to write ui-related stuff in a wpf-style. See here about WinFroms bindings. But in my opinion, WinForms bindings is not so good and I personally prefer not to use them in simple UI.

Related

How do I use browser-specific API's in an isomorphic React App?

I was reading several style guides on using react on the server side, and they all (rightfully) seem to suggest that components should be a pure function of states and props.
That begs a question that if I were to use a DOM API, say window.innerWidth or canvas.getContext(), which is the best place for doing so according to the react + flux philosophy.
componentDidMount will only executed in client side, you can place browser-specific code there.
But if it's not enough, my recommendation it's use DefinePlugin if you prefer webpack as your build tool.(I believe there are plugins provide same feature if you prefer other build tool)
new webpack.DefinePlugin({
__CLIENT__: true
})
And use conditional statement to judge whether the code is executed in browser environment.

Is it possible to use Glade with Scala?

In my hunt for various GUI frameworks, I remembered GTK being a fairly mature library for making user interfaces for desktop applications.
And it got me wondering, is it possible to use the Glade interface designer with Scala? Is there perhaps a Scala-optimised framework or library to make the process more painless?
It appears that there exists a GTK+ binding for Java, and from an unofficial source it seems like you can use this in Scala.
This binding contains class Builder with method addFromFile(), so you should be able to create a UI file in Glade, save it, then load it in your Scala project, and use the method getObject() to access the objects defined in Glade.
For more details you can refer to this question and its answers, which deal with Java, but should be very similar to Scala.
As Scala is interoperable with Java, you can use it's bindings. I highly recommend you to first see a scala REPL micro tutorial for Ubuntu then read and understand what is GtkBuilder and how to create Gtk+ interfaces using Glade. Then a proposed process could be:
Create your apps UIs using Glade
Call GtkBuilder in your Scala code to interact with UI parts (send receive data)
Create Scala script file for each UI
Create a separate backend app with REST interface to present app input/ouput as UI state changes
Connect the two apps
By doing so, you'll get a set of bash scripts (written in Scala) each draw a native UI when executed. Whenever the backend is running, it's possible for UI to be used as I/O of backend app.

instantiate/Call other Views(WPF forms) with their ViewModels using MVVM and Unity

I'm using MVVM and Unity, I've understrood how to show the shell View (MainView with its MainViewModel) but I couldn't find the right way to instantiate other windows, for example : Details Button that opens a new form and show other details.
So, I'm looking for a common way how to instantiate/Call other Views(WPF windows) with their ViewModels using MVVM and Unity.
This answer may help with understanding how to link multiple views/viewModels together. I don't typically find myself needing to open additional windows just displaying different views in the current window.
Please let us know if you're looking specifically for an MVVM solution for opening new windows.
Take a look at this answer: Handling user interactions in MVVM. You can utilize an interaction service to instantiate new WPF windows will still remaining decoupled.
You can also provide indirect communication in WPF by leveraging the Mediator pattern to publish a message from a view model that causes a new view to be instantiated. This answer Simple Mediator implementation gives a quick overview.
I recommend you read over the User Interaction Patterns guidance, as it covers many of the scenarios you will face when using MVVM.

create a very specialised interface sugarcrm

I need a very specialized CRM
Do I
I want to recode the entire layout of sugar crm. whats the best way to start.
write a separate application and update SugarCRM via API calls
Can you be more specific about "very specialized CRM" ?
1.) You can customize all the field, drop down menus, layouts using the studio.
Check out:
http://developers.sugarcrm.com/docs/OS/6.1/-docs-Developer_Guides-Sugar_Developer_Guide_6.1.0-Chapter%204%20Customizing%20Sugar.html
Since you have decided to use SugarCRM don't develop UI outside SugarCRM. Since SugarCRM is very extensible and basicly every view in it can be replaced with any smarty tempalte/html page then there is no reason not to use it's functionalities especialy something like privilidges, home dashboards etc.
So my answer is go with SugarCRM customization.
If you are looking to re-write the whole MVC architecture of Sugar, I would write your own system based off a PHP MVC framework like Zend or CakePHP, if you are just looking to create specialized fields, and maybe tweak some layouts or something, I would recommend SugarCRM, because created fields and adding them to a basic 2 column form layout is quite simple. Even extending the current views is pretty easy if you have a solid grasp of OOPHP and the MVC architecture. Without knowing all your needs here, I'd be very surprised if you had to write a whole custom system. Almost Everything can be extended and customized in an upgrade safe way, which leaves you open to gaining the benefits of the new SugarCRM releases when they come out with out losing your custom enhancements.

Clean separation of UI with Caliburn MVVM

Looking into various MVVM frameworks for SL. In the Caliburn documentation I saw a code in a controller that calls MessageBox. Is this right or is this just for intro? Is there something like MessageBox service in Caliburn like in Chinch MVVM?
It's indeed introductive code, just to demonstrate that the controller method is actually executed. Yet, I agree on the issue you pointed out: the presence of raw UI code in the presenter could lead to an inappropriate mix of view concerns.
About the MessageBox service: in Caliburn v2 (trunk), ShellFramework module, there is a Question/Answer ViewModel abstracting the functionality of a MessageBox, with the advantage of letting you to design the UI for the dialog.
Also, it's very straightforward to roll your own IMessageBox abstraction and provide a basic implementation using the default WPF MessageBox.
Marco is correct. This is just to demonstrate that the action is called. I wouldn't recommend this in practice. I will try to make some changes to the samples or add some comments that make this clearer. Caliburn has services built-in for calling custom message boxes.