What is the difference between Seaside programmming and other web programming - smalltalk

To me it seems the main point of Seaside is that it is more like normal "desktop" programming.
The control flow looks much more like "traditional" programming instead of
"web" programming. Is that a correct impression?
I know it's about Web programming but it's does not looks like it from the programmers side. It looks much more than driving "desktop" applications. Does this clarify the question a bit?

The point of Seaside is not really to be like desktop programming, though it does try to take much of the pain out of web development. Seaside is known for two things which you might consider "desktop-application-like":
using continuations to allow you to write multi-step processes that prompt the user for information
using blocks (closures) to provide event-handler-like "callbacks" into your code whenever links are clicked, forms submitted, etc.
These things vastly simplify certain web development tasks, though the first ends up being used fairly infrequently in practice.
Seaside provides many other things, though:
The ability to write web applications in Smalltalk (very productive and pleasant)
Composable, reusable "components"
Components can delegate to other components, which replaces just that part of the page
Easy management of session state and certain state can be marked to be rolled back whenever the user uses the Back button so it always has the correct value when callbacks are executed
A very nice Canvas API for programatically generating HTML, JQuery, Scriptaculous
The ability to debug and fix errors live on a running site
Most of these are not unique to Seaside but they are somewhat unusual. So how is it different from other web programming? You get to write in Smalltalk. You don't have to mentally context-shift back and forth between code and a templating language. You don't have to worry about form field names, URLs, etc. unless/until you want to. You probably won't hate web programming as much if you use Seaside.
People may discover Seaside because of its "desktop programming features" but they usually hang around for all the other stuff.

Your impression is correct. Seaside is designed for what I call a tree-like control flow, as desktop GUI apps have. Comparing to the Aida/Web, another Smalltalk web framework, which is meant for graph-like control flow, and that is actually what you have on the web.
But tree-like control flow is very useful in such cases like confirmation dialogs, or for popups like those very frequent on Facebook these days. That's why we are introducing the tree-like control flow in Aida/Web too, that is, we are combining both control flows together.

Seaside is an app framework for developing web apps written in smalltalk. What do you mean by it looks like "traditional" programming
Edit-
Seaside architecture is different from in which its web pages are built as trees of individual, stateful components, each encapsulating a small portion of a page

Related

What can developers do to assist in automation testing?

The company I work for is starting a new web application, and I have requested that front end developers make this application Automation Friendly.
The previous application was using the react framework, very few elements had unique ID's (or any unique identifier at all). This time around, I have asked the developers to include a custom data attribute, specifically for automation.
I am looking for anyone who may have experience in this kind of situation.
What have you asked your developers to do to assist in automation?
Are there any standards, or guidelines for naming elements in an application to suit Selenium automation?
are custom data attributes the best way to go? are there other options?
Any advice/guidance would be greatly appreciated!
Web Applications can be difficult to test if they aren’t made with testing in mind. This is especially true for Single Page Applications (SPAs). SPAs support heavy interaction without incurring additional page loads (e.g. Facebook, Gmail). Instead of page loads, these SPAs use AJAX requests to relay data back and forth from the server.
As per #ChrisChua from ThousandEyes these are some of the best practices to keep in mind as you develop your web application to make testing easier:
Add classes that are meaningful.
Classes should indicate the element’s functionality and state.
Use functional names in IDs and classes for action elements.
Dynamically generated classes and IDs are not helpful for testing.
Add targetable DOM feedback to indicate application state.
Never hard-code content in test code!
Conclusion
It's true some of these are not easy changes, as the developer may have to think harder about using test-friendly designs rather than "something that just works". However, it will definitely help with maintainability of the testing, which would reduce costs in the long run.
tl; dr
A couple of references:
Nicolas Gallagher’s article on HTML Semantics and Front-end Architecture
Yandex’s Block Element Modifier
W3C’s recommendation on good class names
Pamela Fox’s article on Frontend Architectures
Test Driven Development makes it easier to automate. In my opinion, testers should be developers, or ex-developers who are good at finding and preventing mistakes. Write the tests in the same project that the solution is being developed in. Developers can also put in ids, even though they don’t want to sometimes, and if the “testers” are good they can even submit pull requests (in GitHub for example) for code improvements that will allow them to test better. Think of testers as a piece of your development team, where everyone is allowed to contribute code. It helps with accountability and improves autonomy. Everyone is there to help each other and if all the code is in the same project, and all code is reviewed and approved before merging to master, everyone is a potential developer if everyone is IT. The old days of manual testing are dying. Separating Dev from Testing is a brick wall. Tear it down.

Benefits in using the Visual State Manager over handling Current_SizeChanged event in code (WinRT, XAML)

I'm writing my first WinRT app for Windows 8 in C#/XAML managed code and I obviously have to handle the UI in the different sizes and orientations that could occur (FullScreenLandscape, FullScreenPortrait, Filled and Snapped).
Most people seem to suggest handling the UI changes through the Visual State Manager in XAML, however me being more comfortable with writing the code-behind rather than XAML, I thought I would simply handle the Current_SizeChanged event with a switch statement for each of the states.
I tried both ways and both seem to work for me (though the VSM was decidedly more work - at least for me).
Can someone tell me why I should use the VSM over code, or what benefits I would receive?
It's a good question, and certainly one that entered my head when starting WPF & WinRT development. Having coded C# projects for years, it seemed a strange concept to start building UI logic in the Xaml (which is usually more lines than C#, but also more declarative).
In actual fact (if you don't mind me saying) I think we can abstract your question out to 'Is there any benefit to writing UI code in Xaml over C#/VB.net?'.
Let me give you an example, in work I'm on a project team with several developers, and several graphic designers. The designers are pretty awesome at laying out that Xaml, and creating a consistent feel for the application (something I can't say I would be that good at) - but will have little idea when it comes to writing web-services and Data Access layers - which is our job as developers. And that's how it should be right?
Well whenever you start writing a lot of View/UI related logic in C#.net, this can lead to all sorts of problems. The designers all of a sudden can't focus on the Xaml at hand, and must get up to speed with OO programming. In our project this isn't that much of a concern, as the designers are actually pretty competent developers (must have been all that UI code I forced them to understand last year :)) But what I think it boils down to is a 'Separation of Concerns' at a job description level. If we take the paradigms associated to WPF I think things like Databinding 'guides' developers down a road where they create separated, testable UI and Business layers - the same way that the nature of Xaml allows for a very declarative approach to writing UI where the View Logic is created and maintained in a very readable manner without getting too much into the nature of OO programming.
So, coming back to your question - No, I don't think there any immediate benefits, and if you come from a mainly .Net background to write a lot of these things is Xaml can be little tricky. However, if you are in a team of people - or if you find best-practices a very important factor in development, then writing View related code such as Visual State manager configuration in Xaml is the way to go.
One last point - you'll notice I used the terminology 'View related logic' a lot. This is because it's widly viewed that writing UI related code in code-behind is acceptable (if not best-practice) but sometimes due to the nature of the WPF or WinRT framework you are dragged down this route for some functionality. However, if you are writing business logic in the UI files codebehind this is viewed a particular no-no. This breaks the 'seperation of concerns' and can make testing very difficult. If you are following the MVVM pattern (as many WPF or WinRT projects do) then this is what the ViewModel is responsible for.

Webkit vs Processing for Interactive Applications

I know this sounds a little bizarre, but there is a very simple application I want to write, a sort of unique image viewer, which requires some interactivity with the host system at the user level. Simplicity when developing is a must as this is a very small side project. The project does require some amount of graphical work and quite a bit of mouse based interactivity (as well as some keyboard shortcuts), but quite frankly, I don't want to dig my hands into OGL for something this small. I looked at the available options, and I think I've narrowed it down to two main choices: Webkit (through either QtWebkit or WebkitGtk), and the language Processing.
Since I haven't actually used Processing but I do have some amount of HTML5 canvas and Javascript experience, I am somewhat tempted to using a Webkit based solution. There are however, several concerns I have.
How is Webkit's support for canvas, specifically for more graphically intensive processes?
I've heard that bridging is handled better in QtWebkit than WebkitGtk. Is this still true?
To what degree can bridging actually do? Can a Webkit based application do everything that an application which interacts with the files on the system needs?
Looking at Processing, there are similarly, a couple things I'm wondering.
Processing is known for its graphical capabilities, but how capable is it for writing a general everyday desktop application?
There are many sources that link Processing to Java, both in lineage as well as in distributing applications over the web (ie: JApplets). Is the "Application Export" similarly closely integrated with Java?
As for directly comparing the two, the main concern I do have is the overhead of each. I want the application to start up as snappy as possible, and I know that Java has a bit of an overhead regarding start up because it first has to start up the interpreter. How do Processing and QtWebkit/WebkitGtk compare for start up?
Note that I am targeting the Linux platform only.
Thanks!
It's difficult to give a specific answer, because you're actually asking a few different kind of questions - and some of them you could be more precise.
Processing is a subset or child of java - it's really "just" a java framework with an free ide that hides the messy setup work of building an applet, so that a user can dive in and write something quickly without getting bogged down in widgets and ui, etc. So processing can exist by itself and the end user needs to know nothing of Java (except syntax - processing is java, so the user must learn java syntax).
But a programmer who already knows java can exploit the fun quick nature of processing and then leverage their normal java experience for whatever else is needed - everything of java is in processing, just a maybe slightly hidden (but only at first) It's also possible to import the processing.jars into an existing java program and use them there. See http://processing.org/learning/eclipse/ form more information.
"how capable is it for writing a general everyday desktop application?" - Not particularly on it's own (it's not made to be), but some things are possible and easy (i.e. file saving & loading, non-standard gui, etc.), and in some ways it's similar to old school actionscript or lingo. There is a library called controlP5 that makes gui stuff a bit easier.
Webkit is another kettle of fish, especially if you aren't making a web-based thing (it sounds like you're thinking on using the webkit libraries as part of a larger program. I'll admit I don't have the dev expertise with those specific libraries to give you the answer you really want, but I'm pretty certain that unless you have programming experience beyond html5/javascript you'll probably get going much faster with processing.
Good luck with whichever path you choose!

Winforms development - Any recommendations on how to improve the look and feel of UI

My team is currently working on windows forms project using VB.NET. We are curently focused on functionality and the UI seems to very basic (if you drag and drop from the toolbox to your windows forms)
Is there any recommendations or standards when it comes to UI for windows forms development? I want to ensure that the client gets a great UI.
I appreciate your support.
Yes, it's a simple standard: make sure that you follow the Windows User Experience Interaction Guidelines.
There's absolutely nothing wrong with "simple". In fact, in many cases, simple is good!
Your focus should be on making things easy, intuitive, and conform to user's expectations. Modeling your app after other applications, particularly those included with Windows, is a good way to make sure that you're on the right path.
Breaking new ground is dangerous territory; leave that to the big shops like Microsoft. Even new UI concepts that have panels of user interface/experience experts behind them like the Ribbon are slow to be accepted and even slower to be adopted. This isn't where a small software shop wants to be. There's no advantage in being out on the leading edge here.
The recommendations you'll inevitably get to use third-party controls are well-meaning, but ultimately misplaced. There's nothing wrong with the built-in controls and a lot of reasons to prefer them.
Once you've got a functional UI that conforms to the standard guidelines for your platform, the next step is real-world testing with actual human users who have never worked on any aspect of your application.
If they like it and they find it easy to use, then you know you're on the right path. I've never heard a user complain that something looks "too simple". Google Chrome is a huge hit precisely because it's simple. Remember that you're not designing a web page here. Desktop applications are very different.
In fact, it blows my mind how often questions like this one get asked here. Why do desktop app programmers spend so much time wishing that their app looked "cooler"? These are often the same developers who complained loudly because Visual Studio 2010 switched to WPF, broke a lot of their standard expectations, and got a lot slower, with little noticeable benefit. Sure, it looked cooler (unless you didn't like the color blue), but there was little in the way of functionality that the UI change alone was responsible for. Look at the apps you use every day. Do you really pine for a more whiz-bang UI? Or do you appreciate them and integrate them into your workflow because of how they work—because they conform to your hard-learned expectations of how a standard Windows application should work?
Make your app work like that.
Believe it or not, UI is very important to the end user. Its good you focus on functionality first, but when its done, make sure the user will have a good experience with your system. Make it as easier as you can, keep in mind that every user does not know everything about softwares, dont let him/her make a mistake, the look and feel must be very nice from the user's point of view, its not important to the system but it is to the user.
I use to use third party controls that manage the look and feel (DevExpress) you can try but if you are going to try some third party controls, you will have to do it at beginning of development, because the functionality may change.
I hope it can help you some.
Regards.

Is the mac cocoa development toolset considered rapid app development?

I heard someone say that developing on the mac using cocoa is great for rapid development.
Is it a good framework for building GUI based apps relatively fast?
Here's for some historical perspective:
The Cocoa framework evolved from the NeXTSTEP framework when Apple bought NeXT (and Steve Jobs along with it) to form the basis of OS X. This is why you see lots of NS littered throughout Cocoa. And NeXTSTEP was one of the earliest frameworks to call itself a RAD framework. So from that point yes, Cocoa is a RAD framework.
There was a famous demo of how fast you can develop apps in NeXTSTEP where a full-fledged text editor (with font selection, file load/save, everything) was developed during the course of the demo (I believe it was under 30 minutes).
Another famous use of NeXTSTEP was the invention of the World Wide Web. Basically HTTP and HTML. Legend has it that Tim Berners-Lee cooked up HTTP and HTML and prototyped the worlds first web browser and web server in just a couple of days. And remember, that first web browser had the ability to edit as well as view HTML -- yes, the original internet was a giant Wiki!
Even at the time it was released as Cocoa around 96/97 it was still considered one of the top RAD environments around. This was around the time Borland was heavily positioning Delphi as a RAD environment and Microsoft's MFC was painful to use in comparison.
These days I would say that it is roughly comparable to .Net. Though I personally feel (and I know lots of long-time Cocoa programmers tend to share this sentiment) that Cocoa still has an edge in how fast I can take an idea to completion and how clean the resulting code is. It's an older framework, more mature and implemented lots of things right but other frameworks have had lots of time to catch up.
I strongly believe the combination of Interface Builder and Cocoa makes prototyping an application faster than anything else I've used. Typically, creating something that is 'visible' takes just a few minutes using IB to wire controls to code, and a few more to write the code itself. Factor in the modular nature of View Controllers and the process of adding GUI elements to a large codebase is suddenly very easy. The next version of Xcode makes this process even faster, so I daresay you've got a lot to look forward to.
If you are familiar with the tools and willing to work with the provided UI elements then I think so. However because you're working with a fairly rich and stateful UI once you decide that you need custom views then you have signed up for some real work.
Overall I find web development slightly faster, largely because there's a wider selection of available libraries and frameworks to build on, but that's only an alternative for certain types of applications.