Colour Schemes from Nature

colours, web Comments Off

Syndicated from Some Brisbane Guy, by the same clown

Linked from a Hacker News “Ask HN” post about how to pick colours for websites, I was inspired by this Flickr image showing how to create a colour scheme from a photo.

I decided I’d try this colour scheme from nature business, and because I’m lazy I took a picture with my phone without even getting up from my chair. Here’s what I came up with:

colour scheme from photo of my street

colour scheme from photo of my street

I haven’t tried it in a website yet but I think it might look alright, I’m going to try this next time I’m stuck.

WinDev MVC

WinDev 5 Comments »

Developing WinDev applications can be fun and challenging, but where there’s ease of use comes great responsibility.

You need to structure your code is such a way that it will be easily maintainable for yourself and other developers involved in the project.

So MVC comes to the rescue when you want to have a clean and tidy source project. But I here you say, “WinDev doesn’t have an MVC framework”. Well I am going to show you how easy it is to structure your project in such a way that will make it MVC friendly.

What are we trying to achieve here?

To often we just add H commands to our form code just because it is easy to do. But the problem is this soon makes the application messy and you will find more cases of duplicating a process that was in another form.

I am going to show you a simple example of how I structure my projects in an MVC style.

Firstly I created 2 custom folders in Classes, one for Models which will interact with the database, and the other is Controllers which is the conduit between the window form code and the model.

image

Models

In the screen shot above you can see I have created a UserModel. This class contains all the methods I need to access the database related to a user.

Within the model is a Structure object which represents the User table fields in the database.

image 

So here is an example of the GetUser method in the model which returns an object of type STUser.

image

Now the windows code does not access the model, it’s the controller that uses the model to return the required data and other information needed by the window.

image

In the controller the code here calls the model and returns the data as a STUser object. Here you would code other functionality you needed to manipulate the data to show in the View (form/window).

If you are using WinDev 14 then you can use the STUser structure in a very simple way to update the form.

Firstly you would create an object used to hold the data returned from the controller.

image

In the example above I have created a global object which will now allow me to link the controls on the form to it, as you can see in the screen shot below.

image

Now I have linked the controls to the object I can get the user data in just a couple lines of code.

image

If you don’t have WinDev 14 then its a simple task of assigning the object field data to the controls instead, as shown in this screen shot.

image

So now you can see how using the MVC pattern in WinDev / WebDev can make your code clean and easy to maintain.


Bookmark and Share

PC Soft Release WinDev Updates

WebDev, WinDev No Comments »

I’m a few days late on this so I would suspect most of you know about the latest updates which fix a number of bugs in version 12 and 14.

http://www.windev.com/ts/download/windev14/index.html

The WinDev 14 update fixes a number of bugs with the Windows Editor, Report Editor, Setup and Execution.

There was no WebDev 14 update but they did release one for version 12 which fixed bugs with the Data Model Editor, Query Editor, Page Editor, Reports and Printouts, some install site changes, programming functions, PDF formatting in Linux and a fix to the HyperFileSQL HClose method in a thread.

Bookmark and Share

PC Soft Release Community Site

WinDev No Comments »

It’s a strange name but a great step in the direction for the community. If you have any handy API’s, libraries etc you can post them to the site so that others can make use of your fine work.

image

You need to create an account and then you can post a resource (blog post) to the site.

We are really starting to see some momentum now at PC Soft so I am very excited about the new site and community spirit.

http://repository.windev.com/

Bookmark and Share

WinDev Fix for TX Text Control

WinDev No Comments »

tx_logo If you are wanting to use the TX Text control with WinDev then the great news is that PC Soft have released an interim fix. This will be in a major release but you can get the fix now by contacting PC Soft.

I have made some tests with the fix and the component is working smoothly now.

Bookmark and Share

WebDev – Writing JavaScript in WebDev

Uncategorized 1 Comment »

I see a lot of people trip up when they want to add some JavaScript to their browser code.

By default all browser methods are defined as WL as you can see from the screen shot below.

image

The letters WL and the green tell me this is a WL method, but if you click on the word WL then the method will change to JS. Now you can enter your JavaScript code.

image

The great thing is that the IDE supports JavaScript and will report any syntax errors.

Bookmark and Share

WebDev Tutorial – Call Server at Regular Intervals

WebDev No Comments »

If you need to call a server process at regular intervals in your web page then this is actually a simple task that requires only a few lines of code and a little Ajax fun.

In this tutorial I will show you how to create a page to display the current system time. It will show you the principles of how to perform this operation so you can then use it in your own web apps.

I firstly created a Dynamic WebDev App and added a page. On the page I added a Cell component and inside a Static Control which will display the time.

image

We are not going to be using any JavaScript for this, just some simple WL. Firstly we need to add a Timer to the browser load event.

image

Now remember this code is executed in the browser and not on the server so make sure you choose the correct event.

The code will call a WL method called CheckTheTime every second. You need to create a New Local Browser Procedure which the timer will call.

image

This is one of many things I love about WebDev, making AJAX calls is such  a breeze. So the code above will call a method on the server which will return the current system time as a string.

So now create a new Local Procedure (server side procedure) called GetTime. As you are making an AJAX call to this method you have to enable it to allow this type of action. Once again this is very simple, just click on the AJAX word at the top next to the method and the LED light will go green to show it has been enabled.

image

Then all you have to do is write the code which returns time time.

image

That’s it, you are done. Running the page will now display the current time and will automatically refresh every second.

Bookmark and Share

Using TX Text Control in WinDev

WinDev No Comments »

The current releases of WinDev has a bug when you want to use the TX Text ActiveX control on a WinDev form.

There is a work around by adding the following code to the initialisation method of the ActiveX component.

image

A fix for this will be in the next release but at leased you can easily work around the problem.

Thanks PC Soft Support for this…

Bookmark and Share

WinDev 14 – Project Explorer Tip

WinDev No Comments »

If you open a window, class, etc using the Ctr-E Fast Selection window

image

then your window will be out of sync with the Project explorer. You don’t need to go finding the window you are working on manually, just select the synchronise element button image  in project explorer.

Bookmark and Share

Are PC Soft Really Committed to the WinDev English Version?

WebDev, WinDev 39 Comments »

UPDATE!!

This afternoon I received a telephone call from Claudia at PC Soft. She discussed my comments in this blog post and explained about some of the benefits we have received from a later version which included more examples translated to English.

I reiterated about the number of bugs we are getting with this new version and Claudia has asked for you to please send bug reports to PC Soft so that they can investigate them.

She also wants to hear from you if you are having any issues with PC Soft or concerns about bugs not being resolved. Please contact Claudia at claudia.rivera@pcsoft.fr and help her to understand any issues you have.

 

I discussed about the bugs that developers are complaining about in the latest version

Powered_By_WinDev I have been developing applications and websites in WinDev / WebDev for the past 2 years. So why this question now?

Well we have seen the release of Version 14 at the beginning of this month, 6 months after the French release. Come on now PC Soft, 6 months is a lifetime in the technology industry. If they were really committed to expanding then you would see the English version created in parallel to the French.

If you look at other development tools, many produce multi-lingual versions and release them at the same time.

Maybe its a problem with their codebase which makes it complicated to created multi-lingual versions, but surely they would be working towards resolving this.

The other issue is the lack of communication between the community and PC Soft. The www.windev.com website it pretty much stagnant with no focus on providing information about news, tips etc.

What about LST? Why do they not produce an English version?

WINDEV-Look-Editeur Don’t get me wrong, I love programming in WinDev but I feel it is a very lonely experience. I am also finding it harder to convince clients their are other developers that can support the systems I write. I know there are some but we are talking so much less than there should be.

WinDev 14 has made me re-think about this product, not only for the 6 months wait but then the quality. Every day I come across a bug which is driving me nuts.

The new version has all these new information messages to help you build quality code, but it generates these errors even on PC Soft’s own RAD classes.

I don’t want to move back to .NET but its looking more that I will have to. It’s sad as I have already started writing a WinDev book but what should I do?

I think now it the time for the powers at PC Soft to speak up and be more open about their future plans.

We’ll there’s my rant and you are welcome to disagree. Leave a comment and maybe we can make PC Soft aware of our feelings and hope they will become more involved in the community.

Bookmark and Share
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in