Codejock Calendar Samples?

Re: Codejock Calendar Samples?

Postby James Bott » Fri Jan 21, 2011 4:40 pm

Reinaldo,

RE: WaitForEvent()

So it seems that if we were using a DBF for a group calendar, then all we need to monitor for a calendar update, is to check to see if the date and time of the DBF has been changed? This could be done with a simple polling routine as you mentioned.

To check for an update, we could store the date and time as statics in a function, then just call the function in the polling routine.

One concern is that disk read/write buffering could create a delay of an unknown and variable time.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Codejock Calendar Samples?

Postby reinaldocrespo » Fri Jan 21, 2011 6:01 pm

James;

You really don't need to check for anything. What you really do is listen (sp_waitforevent(0) zero wait time), for the notification from the server that something has happened. You then make a decision as to what to do about it. The server will only send notifications to all clients if there is a "trigger" created to notify about it.

The server takes care of issuing the "notification". In the case of a multi-user calendar; a trigger on the table needs to be set so that the server issues a notification anytime a calendar event is "updated", deleted, or "inserted".

Then, In a single threaded app, you would need to issue the API function ("sp_waitforevent(0)") with zero wait time to learn of any notification. BTW- the notification can also add information about what happened such as record #, info changed, etc... Listening for a notification can be done as part of a main loop, when taking some action, or by simply placing the command on a timer. If using a timer, then you'd have to execute some codeblock to update the calendar's data set.

I still have not implemented notifications on my calendar app. I don't think it will be hard. I have implemented ADS notifications in the past. For example: to alert the user that the current xbrowse needs to be refreshed. For example, when viewing the current hospital census on an xbrowse, a new patient may be admitted. At that moment a "normally" green dot turns yellow. That way the user knows that the census has changed and needs to press the refresh button. Optionally the user may "turn-on" the automatic refresh option. In that case, the xbrowse autorefreshes anytime a notification that affects the census is received.

As you see here, there is no disk-read-write-buffering of any kind. The polling is for messages not the actual table. The message is issued by the server as a response to an update/delete/insert operation. Furthermore, to refresh the current view you could simply use the information that's included with the notification (only after version 10 of the Server). If you do that, then there is zero read from disk. ...and you must know that ADS implements notifications for dbfs as well as adt table types.

The subject of Notifications from the sql-server is somewhat alien to our (moslty single user) dbf world. But ADS makes it available to DBFs. And it just makes life easier.


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Codejock Calendar Samples?

Postby James Bott » Fri Jan 21, 2011 6:14 pm

Reinaldo,

Sorry, I wasn't clear. I was referring to when using DBFs without ADS.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Codejock Calendar Samples?

Postby nageswaragunupudi » Fri Jan 21, 2011 6:22 pm

I envy Mr. Reinaldo that he is fortunate to be working with ADS. I personally love ADS. Unfortunately, in India, ADS is not popular. Those who can afford go to Oracle or MSSql and others insist on free solutions like MySql. I am sad I lost the opportunity to work with ADS now.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Codejock Calendar Samples?

Postby hmpaquito » Fri Jan 21, 2011 10:09 pm

Reinaldo,

Without doubts, ADS is great, but expensive.
Thank you very much for your explication.

Regards


reinaldocrespo wrote:hmpaquito;

Let's move this thread over to the spanish forum. ...y evitamos incomodar a los que no entienden. In the mean while; please excuse me for answering in English.

I will attempt to explain ADS Notifications:

Notifications provide a mechanism for communicating to a client that something has occurred. For example, notifications can be used to inform a client application that data in a critical table has changed. The client application can then use this information to refresh() an xbrowse (or some other control) of that table and thus provide the user with more up to date information (without having to "poll" the table).

A Notification might be used to signal a client that a record has been added to a special table created for purpose of communicating messages from the system administrator to the end users. The client application can then read the latest message and display it within its interface.

A Notification might be used to signal a client that a record has changed. The client app my make a decision based on what changed on that particular record. Perhaps create an entry on a queue to send some information via email. Then a client app listening for such notifications can take care of sending the email.

These are all typical situations where an ADS Notification might be used. No coding. No .prg. ADS provides an API to create a notification, to listen for notifications, to know if a notification has been issued while the app was not listening. etc...

Specifically ADS API provides "sp_SignalEvent()" to create a Notification based on some condition. That part can be stored on the ADS Data Dictionary as a trigger so that you never have to tell the server again to issue a Notification based on that condition. The server always knows because you saved that as a "trigger" info on the Data Dictionary. Then API function "sp_WaitForEvent()" will inform the client application if an event has occurred.

On a single threaded app, you test for notifications by using a repeated periodic call with short timeouts -i.e. "polling". But not polling the table but rather polling for the event notification. Due to its nature, polling will not actually notify the client app when a change has occurred, but rather notifies the client that a change HAS occurred sometime between now and the last check. But that works just fine.

So, In essence, with ADS notifications you take care of "events" on any table without having to write or "invent the wheel". The wheel is already invented and running smoothly. For more information about ADS notifications; please visit http://devzone.advantagedatabase.com.

Hope that helps,



Reinaldo.
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Codejock Calendar Samples?

Postby reinaldocrespo » Fri Jan 21, 2011 10:20 pm

hmpaquito;

I usually don't answer this type of comments because I have no idea what it is like outside North America. Just for the record, in the US I find ADS to be the least expensive SQL in the market. ...that's including mysql.

Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Codejock Calendar Samples?

Postby Bayron » Sat Jan 22, 2011 12:33 am

Reinaldo, please don't take it the wrong way, what we don't know is like what we don't see...

In my country Guatemala, minimum wage is less than US$200 a month, that is for the very few people that are lucky enough to have a job...

Other country's are not as lucky as Guatemala... we have good salary's compared to other country's...

That not being enough, a gallon of gas here is US$4.20 just 2 hours ago when I filled my tank...
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Codejock Calendar Samples?

Postby reinaldocrespo » Sat Jan 22, 2011 12:41 am

Bayron;

Still that doesn't make ADS any more expensive than ms-Sql (in Gatemala or not) or any other sql for that matter. Notice I'm comparing SQL prices. The only SQL less expensive than ADS is NO SQL. So in a vertical market, when I compete with other vendors that sell/installs ms-sql with their software, I already have a price advantage.

Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Codejock Calendar Samples?

Postby MdaSolution » Sat Jan 22, 2011 1:38 pm

Please help me to create this viewtopic.php?f=3&t=20710
If we 'llwork together we can create it
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Codejock Calendar Samples?

Postby reinaldocrespo » Sat Jan 22, 2011 1:47 pm

MdaSolution;

Hi.

I already tried that. AMOF; the code will be released soon and it's not bad. I think you will enjoy this Calendar class very much. But for myself, I finally decided to go with CodeJock because I felt that for the price you save a lot of time and furthermore I didn't think that fw users would be willing to pay for the class so it made no financial sense.


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Codejock Calendar Samples?

Postby Otto » Sat Jan 22, 2011 4:13 pm

Back in my VB6 times I used some components of Codejock,
especially ribbonbar and also the calendar.
In my opinion there are too many setup possibilities, designers, etc.
You never come to an end with your application development. If you are nearly ready
a new release is available.
I feel it is much easier to use FW own ribbonbar. Also speed behavior is much better.
If you really want to use all the stuff from the components you have to have an own specialist in your company who does this work.

I think if you implement all the options codejock calendar offers like in your screen shot you could use Outlook and not an own calendar.
Codejock components are rock solid but I made the experiences that it is hard to trace errors if you use many components.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Codejock Calendar Samples?

Postby TimStone » Mon Jan 24, 2011 4:13 pm

I looked at Codejock several years ago, and I corresponded with their staff. I was very impressed but didn't want to deal with the work around for the .DBFs I use.

Recently I started working with Reinaldo and James to implement the Calendar class into my own application. I've had other solutions but felt the need to match Outlook for competitive reasons. My clients will be thrilled with the results. It has also been an incentive for me to take a "learning step" in transitioning from the typical xBase coding to a full class implementation.

We have discussed and prototyped a FW calendar control for several years but time is limited and I think many other priorities exist. It will probably take a couple of years after it is introduced to refine it ( think about how the xBase control gets better and better over time ), so a useful production model may be a long time away. In this case, I needed a better "appearance" to my appointment scheduler a long time ago.

Because of an incentive they offered, I did invest in the full library. I'm not sure how much I will use, but time will tell !

On ADS, I incorporated that many years ago. As a reseller of it to my clients, I get my developer license for free, so I have a full test copy of the latest version. My clients decide if they need it. My software recognises it automatically, thus they can be in DBF/CDX mode naturally, and if it is present, they are in Client Server mode. I recommend it for more then two workstations. Frankly, if a company needs more then 2 workstations, it can afford an ADS license. Your cost to develope for it is free. Thats pretty affordable.
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Codejock Calendar Samples?

Postby Otto » Mon Jan 24, 2011 5:44 pm

Hello Tim,

I can’t imagine what your calendar is doing. Would you be so kind to tell us more maybe you can post a screenshot.
Is it a standalone or do you work together with outlook?
I am curious to hear in 6 month about your experiences.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Codejock Calendar Samples?

Postby reinaldocrespo » Mon Jan 24, 2011 6:40 pm

Hi Friends;

I don't wish to convince anybody about CodeJock. I only want to share information for everyone's benefit. It is true that the calendar control is huge and extremely configurable. Yes, you can use outlook data, or any other source of data as well as a combination of data sources including google calendar. By any source, I mean, xml, dbf, mdb, sql, mysql, ads, outlook, arrays, objects, memory, oracle, flat files, ....

The control is well worth its cost and they are always running special deals where you can get the control for about $100. It is totally the outlook look and feel. I always avoided writing a calendar for my customers and instead always told them to use outlook. But the fact of the matter is that outlook could not tell them if the patient with an appointment got serviced or not. Outlook does not pickup insurance information and will not integrate with my other tables.

As complete and configurable as the control is, you don't have to implement every single feature. Tim got the calendar up an running in two days, yes there were some kinks, but still -he only started working with the calendar last Friday and I already saw a screen shot of his app -it blew me away.

These screen shots are from my calendar app developed in a little over a week and it is already installed as a beta at a customer site:

Here I'm selecting more than one day:
Image

Here I'm displaying a custom form to enter specific data:
Image

Again, I'm only sharing what I trust to be valuable information and I hope it helps some.

regards,


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Codejock Calendar Samples?

Postby TimStone » Mon Jan 24, 2011 6:49 pm

Otto,

As part of my App, I have an appointment scheduler that must handle multiple events for each day/time. I used a browse to list them on a particular day, and also a Gantt type chart to show available times. However, the look and feel ( which inherited from the old Grumpfish DOS calendar ) was just not modern and clients wanted an Outlook type of appearance. However, my clients do not necessarily use Outlook ( most have no idea what it is even ).

I also track a lot of info per appointment, but the main issue was the interface. The Codejock calendar will allow me to get the job done now. I hope I am right because I already invested in it, and funds are very precious right now. However, the initial results do look promising.

Yes there are a lot of things we could set, but so far my code has been fairly minimal and yet I'm getting what I need.

My comments about the pending FWH calendar class were not in any way a criticism. We all know that a new class takes a long time to iron out all the issues and expand to meet all the needs. We've seen how much the many FWH classes have improved and expanded over the years. I just needed something now to get this done. I don't tie in a lot of external controls so I don't think the effect will be negative at all.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 113 guests