Server Specs for 4Dv15/16 under Windows Server 2016

2017-07-31 Thread Ronnie Teo via 4D_Tech
Hi,

I’ve been requested to provide the optimal server specifications for running 
4Dv15 or 16 with regards to the CPU, memory and disk requirements for a new VM 
running Windows Server 2016.

Other than the hard disk requirements which is dependent on the data size and 
the projected rate of growth, does any one have any recommendations in this 
regard?

Regards,
Ronnie
Tarawerkz

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re(2): 4D db -> SAAS

2017-07-31 Thread Don Lapin via 4D_Tech
Thanks Balinder.

We have tried to survey them on how they like the product, but rarely get any 
responses. The few responses we get tend to be requests for features they want 
on a printed form, etc. The customers are mostly small businesses, and may not 
know what they want in terms of UI and local vs web - they may have been 
attracted to the low price point. 

A key function of the product is procedural generation of editable forms in 4D 
Write, followed by export to MS Word. The forms use style sheets which Word can 
also make use of. Any web solution probably would need a capability of this 
sort.

It's likely I would want to see what you've done, so I will try to get in touch 
soon.

Thanks so much,
Don


>Don,
>
>Easiest and quickest is what chuck recommends if possible. Of course if
>customer ok to have shared db as long as it is secure they should not care.
>Rewriting is eventually the best thing and should be your goal as in
>node.js express and heroku etc. Infra cost is a lot less and 4D doesn't run
>on Linux. We have written app in node.js just now and I can show you
>privately if you like. The best thing about our is we have API access so 4D
>UI with cloud json objects still is great way to deliver best quality
>software. 4D alone is painful but when hosted with open source and
>automated using devops CI/CD pipelines magically it starts to make sense.
>
>So question is your what your app customers want? web UI or 4D UI with
>cloud json data?
>
>Balinder
>
>On Mon, 31 Jul 2017 at 20:20, Charles Miller via 4D_Tech <
>4d_tech@lists.4d.com> wrote:
>
>> You could turn into server version by adding customer field to each table
>> and after every query query for that customer. It would entail. A customer
>> table Witt user name customer and field for related queries
>>
>> Regards
>> Chuck
>>
>> Sent from my iPhone
>>
>> > On Jul 31, 2017, at 3:04 PM, Don Lapin via 4D_Tech <4d_tech@lists.4d.com>
>> wrote:
>> >
>> > Hi Folks,
>> >
>> > I have a single-user, non-web-based 4D product in a specific area of
>> chemicals regulatory compliance. It has taken me about two years to develop
>> the application. With the 4D solution, we are charging for a one-time
>> purchase and then for upgrades (more-or-less annually). There is some
>> proprietary information for each customer, which the user would not want
>> exposed in some accidental manner.
>> >
>> > There's some pressure from competitors to offer (as some of them do) a
>> cloud-based solution, where we could be more flexible in terms of how we
>> priced things -- subscriptions for various lengths of time, etc. The
>> revenue might be more sustainable.
>> >
>> > I looked for earlier posts on cloud migration but wanted to ask for
>> current ideas. The last thing I saw related to spinning up individual
>> instances of 4D for each user, which sounds fairly expensive in terms of 4D
>> licenses. Also, right now there is no web interface in the product.
>> >
>> > Any recommendations for a strategy which has worked? Should I rewrite
>> the whole thing in some web-native language and then host on Heroku or
>> similar? Would I have difficulty replicating the interface? Am I looking at
>> another two years - or longer?
>> >
>> > Thanks,
>> > Don
>> >
>> > **
>> > 4D Internet Users Group (4D iNUG)
>> > FAQ:  http://lists.4d.com/faqnug.html
>> > Archive:  http://lists.4d.com/archives.html
>> > Options: http://lists.4d.com/mailman/options/4d_tech
>> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> > **
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
>**
>4D Internet Users Group (4D iNUG)
>FAQ:  http://lists.4d.com/faqnug.html
>Archive:  http://lists.4d.com/archives.html
>Options: http://lists.4d.com/mailman/options/4d_tech
>Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>**

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D db -> SAAS

2017-07-31 Thread Balinder Walia via 4D_Tech
Don,

Easiest and quickest is what chuck recommends if possible. Of course if
customer ok to have shared db as long as it is secure they should not care.
Rewriting is eventually the best thing and should be your goal as in
node.js express and heroku etc. Infra cost is a lot less and 4D doesn't run
on Linux. We have written app in node.js just now and I can show you
privately if you like. The best thing about our is we have API access so 4D
UI with cloud json objects still is great way to deliver best quality
software. 4D alone is painful but when hosted with open source and
automated using devops CI/CD pipelines magically it starts to make sense.

So question is your what your app customers want? web UI or 4D UI with
cloud json data?

Balinder

On Mon, 31 Jul 2017 at 20:20, Charles Miller via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> You could turn into server version by adding customer field to each table
> and after every query query for that customer. It would entail. A customer
> table Witt user name customer and field for related queries
>
> Regards
> Chuck
>
> Sent from my iPhone
>
> > On Jul 31, 2017, at 3:04 PM, Don Lapin via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> >
> > Hi Folks,
> >
> > I have a single-user, non-web-based 4D product in a specific area of
> chemicals regulatory compliance. It has taken me about two years to develop
> the application. With the 4D solution, we are charging for a one-time
> purchase and then for upgrades (more-or-less annually). There is some
> proprietary information for each customer, which the user would not want
> exposed in some accidental manner.
> >
> > There's some pressure from competitors to offer (as some of them do) a
> cloud-based solution, where we could be more flexible in terms of how we
> priced things -- subscriptions for various lengths of time, etc. The
> revenue might be more sustainable.
> >
> > I looked for earlier posts on cloud migration but wanted to ask for
> current ideas. The last thing I saw related to spinning up individual
> instances of 4D for each user, which sounds fairly expensive in terms of 4D
> licenses. Also, right now there is no web interface in the product.
> >
> > Any recommendations for a strategy which has worked? Should I rewrite
> the whole thing in some web-native language and then host on Heroku or
> similar? Would I have difficulty replicating the interface? Am I looking at
> another two years - or longer?
> >
> > Thanks,
> > Don
> >
> > **
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: http://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> > **
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: 4D Forums no longer accessible -- too many redirects

2017-07-31 Thread Timothy Penner via 4D_Tech
Hi Bob,

> Tried the steps. I got tangled up in the migration as I can not remember my 
> very old password. Now what?

If you cannot remember the old Forum password you could request a new password 
through the password forgot url:
http://forums.4d.com/4DACTION/www_password_forgotten/EN/1/

Hope that helps,

-Tim PENNER



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Re(2): 4D db -> SAAS

2017-07-31 Thread Chuck Miller via 4D_Tech
You could split it between different server apps. 200 connections would not be 
too bad but 1 would be a stretch, so I would have different server apps 
colocated near customer with built clients. You could also create a web access 
using active4D, lightening 4D (available from foundation store), native 4D, 
wakanda and I do not think it would take close to 2 years as you already have 
business logic defined

Hope this helps

Regards
Chuck

 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064   
 mailto:cjmillerinformed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D and Sybase connectivity
  http://www.informed-solutions.com  

This message and any attached documents contain information which may be 
confidential, subject to privilege or exempt from disclosure under applicable 
law.  These materials are intended only for the use of the intended recipient. 
If you are not the intended recipient of this transmission, you are hereby 
notified that any distribution, disclosure, printing, copying, storage, 
modification or the taking of any action in reliance upon this transmission is 
strictly prohibited.  Delivery of this message to any person other than the 
intended recipient shall not compromise or waive such confidentiality, 
privilege or exemption from disclosure as to this communication. 

> On Jul 31, 2017, at 3:49 PM, Don Lapin via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi Chuck,
> 
> I understand that part. Right now there are 200 customers, and we would like 
> maybe 5x that many. Does the 4D Server approach work with that number of 
> users? Wouldn't I need to write a web interface, and would that take as much 
> time as rewriting in some other language? Also, what about multiple instances 
> to handle network outages in some regions, etc.?
> 
> Thanks for the quick response,
> Don

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Thinking about optional parameters and optional object elements

2017-07-31 Thread David Adams via 4D_Tech
On Mon, Jul 31, 2017 at 1:44 PM, Julio Carneiro via 4D_Tech <
4d_tech@lists.4d.com> wrote:


> We coud write something like:
> > MyMediocreMethod(->[Table];5;Current date;{numofdays:5})
> or
> > MyMediocreMethod(->[Table];5;Current date;{startDay:0; numofdays:5})
>

Yes, wouldn't that be nice :(

Now, I’ll repeat one more time what I believe is missing from 4D’s object
> implementation: the ability to declare object structures and have compiler
> syntax check them.
>

+1,000! I was fighting for structs for months over on the Forums before I
banished myself from there. As far as I can tell, all I did was annoy 4D
and waste my own time. But, yes, we absolutely need structs. It's a
50-year+ old feature and not having declarable, verifiable structures makes
it *incredibly* hard to write a lot of sensible things in 4D. I'll stop,
but you'e got my vote.  And, agreed, this is a task for the compiler - not
the runtime interpreter.

To date, I have gotten not one person at 4D to seemingly agree that what
I'm talking about is missing, is a problem, or matters. I just don't get
it. Presumably, they don't use 4D for serious work and spend their time in
languages with all kinds of nice tools.


> Where $options would be a “MyMediocreMethodOptions” type object. And the
> compiler could even validate code to populate MyMediocreMethodOptions
> variables.
>

New(). Exactly. Some months back I tried to write my own meta-syntax in 4D
and ultimately had to give up on that too because of the incomplete JSON
support. (I had written a version in V13 using NTK's JSON.) I could have
done it in XML but, honestly, I have to write my own  declarative syntax, a
parser for it, and then a New()/Create() engine and Validate() engine? And
then to do proper validation, I have to write a complete code parser &
scanner? (I got pretty far down that road too.) That's a lot of heavy
lifting for something every other language has build in (and then some.)

What I’m trying to say here is that just replacing optional parameters by a
> C_Object does not bring any benefit, at least to me :-)
> The old David Adams code looks much better to me :-)
>

Well, I think that _everyone_ can agree that he's an idiot, you can just
pick the version you think is an idiot. There are so many to choose from ;-)
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Thinking about optional parameters and optional object elements

2017-07-31 Thread Julio Carneiro via 4D_Tech
Well, I might hate you less ;-) if instead of:
> 
> MyMediocreMethod(->[Table];5;Current date;"";"";0;5)

We coud write something like:
> MyMediocreMethod(->[Table];5;Current date;{numofdays:5})
or
> MyMediocreMethod(->[Table];5;Current date;{startDay:0; numofdays:5})

If the optional parameters are identified in the call, then that makes it 
clearer to me.
Of course there are those cases you mentioned, where the optional parameters 
come from a call chain and it gets harder to identify exactly what is being fed 
to method.

Now, I’ll repeat one more time what I believe is missing from 4D’s object 
implementation: the ability to declare object structures and have compiler 
syntax check them.

Suppose you could have a way to declare (ignore the syntax, not proposing any 
syntax format here, just semantics):

  
C_Structure(MyMediocreMethodOptions;c_text(“format”);c_text(“type”);c_longint(“startDay”);c_longint(“numOfDays”))

(please 4D, if you implement the above do not use my syntax, I’m just trying to 
convey an idea here)


Then, the calls above would become:
> MyMediocreMethod(->[Table];5;Current date;$options)

Where $options would be a “MyMediocreMethodOptions” type object. And the 
compiler could even validate code to populate MyMediocreMethodOptions variables.
So, using the new dot notation you’d have:
   $options.format = “utc”
be validated and
   $options.formato = “utc” /// error, bad attribute
   $options.format = 5 /// error, bad attribute value type


What I’m trying to say here is that just replacing optional parameters by a 
C_Object does not bring any benefit, at least to me :-)
The old David Adams code looks much better to me :-)

cheers,
--
Julio Carneiro
jjfo...@gmail.com



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Thinking about optional parameters and optional object elements

2017-07-31 Thread David Adams via 4D_Tech
Julio,

I'm sure that you hate what I'm saying in the nicest possible way ;-)

I think that you more-or-less got what I was saying, although a bit less
ugly that. This sort of code is really horrible in every way:

   OB SET($options;”o4”;p4;”o5”;”";”o6”;”";”o7”;”")   or
   MyMedioreMethod(->[Table];5;Current date;"";"";0;5)

So, agreed, that's just nasty.

Mostly thinking things through...I may land right back where I've been for
years with optional parameters, but sometimes it is helpful to revisit old
habits. For object creation in general, I'm definitely all in on
initializing objects with a standard structure all in one go.
(Acknowledging that there are likely to be cases where the structure isn't
standard and it would be counter-productive to insist on a standard format.)

I don't default to using options objects, that's for sure. I'm a pretty big
believer in clearly named and specific parameters as they make your
intentions clear at a glance:

GetSum($table_pointer;$date_from;$date_to)

Can be replaced by

C_OBJECT($parameters_object)
// Insert everything here
GetSum($parameters_object)

Ugh:
GetSum($parameters_object)
GetSum($table_pointer;$date_from;$date_to)

#2 is a whole lot more informative in the code itself. For #1, you need to
look at the rest of the method or, more often, see the object at runtime.
(Often times information is flowing through a call chain and you might not
see the object assignments right next to the object being passed down the
chain.)

I do like option objects for otherwise nasty code like this:

   MyMedioreMethod(->[Table];5;Current date;"";"";0;5)

There are four optional parameters and only the last one is used - it's set
to 5. In this case, an options object is nice for a couple of reasons:

-- You only have to assign the value that you're interested in.
-- Under some conditions, the called routine can distinguish between
options that have been supplied and options that have not. With a fixed
parameter list, that's harder.

Does that all make you hate me less? ;-)

I'll tell you one thing I hate, those absurd and massive "parameter"
objects that are all-too common in JavaScript. I mean, they can get just
insanely large. Completely out of control...and odd in a language with a
very nice (as far as I can tell) closure implementation. Closures are
probably the thing that I like the most in JS (at this point...not far
enough along to say I won't find something I like even more.)
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Restricting a query

2017-07-31 Thread bob.miller--- via 4D_Tech
RE> I have a table which contains records for 10 different clients.
I'd like to give a client the ability to search the table for only his
records and not be able to see any of the other clients' records.

Is it possible to do this using the standard 4D Query editor by always
applying an additional search criteria eg clientID=xxx?

Or do I need to build my own custom query editor?
I'm using 4D 15.4.


Michael,

I *wish* you could use this with Views, but today Views only support SQL. 
Please vote for my feature request (when you open the request, you'll see 
a row of stars - click on the starts to give the request a 1-star, 2-star, 
or preferably 4-star rating).  This feature requests asks that since views 
are virtual tables, to allow all 4D query commands to point to the view as 
if it were a table:

http://forums.4d.com/Post/EN/13716634/1/13716635#13716635


In the meantime, you can certainly add a QUERY SELECTION line after 
calling the 4D query editor.

Best regards,


Bob Miller
Chomerics, a division of Parker Hannifin Corporation



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Thinking about optional parameters and optional object elements

2017-07-31 Thread Julio Carneiro via 4D_Tech
David,

If I understood your thoughts right, which is no guarantee at all ;), I believe 
you are proposing replacing a method call like:

   MyMethodWithOptionals(p1, p2, p3, p4)
or
   MyMethodWithOptionals(p1, p2, p3, p4, p5, p6,p7)

where parameters 1-3 are mandatory and 4-7 optional, by something like:

   c_Object($options)
   OB SET($options;”o4”;p4;”o5”;”";”o6”;”";”o7”;”")
   MyMethodWithOptionals(p1, p2, p3, $options)
or
   c_Object($options)
   OB SET($options;”o4”;p4;”o5”;p5;”o6”;p6;”o7”;p7)
   MyMethodWithOptionals(p1, p2, p3, $options)


If that is what you are implying, I do not see the benefit of doing it.
I does not really makes your code clear (my opinion), it is not faster, it does 
not really make it easier to call the method. And it looks awful to me, again 
my opinion.

So, please correct me if I’m wrong, but I do not see the point of going that 
way :-(

cheers,
julio

> On Jul 31, 2017, at 7:49 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Like everybody, I tend to develop habits/patterns/templates for my methods.
> There are lots of benefits to consisincy:
> 
> -- If it worked before, it will work again.
> -- It's a lot faster to do what you know rather than thinking everything
> through from scratch each time.
> -- Old methods look totally understandable, even after a long time.
> 
> So, I tend to name things pretty consitently, organize my methods in a
> couple of basic ways and handle parameters in a particlar way.
> 
> But it's good to revisit old choices now and then and see if there's a
> better way. Not long ago, I was reading some materials arguing aginst
> optional parmeters. Not much after that, Rob Laveaux made a comment
> (paraphrasing here) about initializing objects with *all* elements. In ther
> words, create a C_OBJECT and populate it with all elements right away (even
> if blank or default values) so that the rest of your code never has to
> worry if the element exists or not. It does. All of this got me thinking
> about these similar subjects: optional method parameters and optional
> object elements. I thought I'd toss out a few words and see what other
> people think and might offer. I'm in that brief period when I'm being open
> minded about something. Soon I'll make some deciscions, and then I'll
> probably stick with them for a few years. (Like most people, I'm right all
> the time...but what I think is right does change down the years. Earlier
> David Adams? What an idiot. Now I'm finally right...)
> 
> Anyway, I like explicit parameters, so I'm not down with pushing everything
> into an object - I'm definitely not trying to start that discussion. But I
> do tend to keep param lists short. Here's an imaginary example of a method
> that takes 2-3 parameters:
> 
> MyWonderfulMethod(->[Table]Foo;5)
> MyWonderfulMethod(->[Table]Foo;5;Current date)
> 
> $3 is optional:
> 
> $table_pointer:=$1
> $day_count:=$2
> If (count parameters>=3)
>   $date:=$3
> Else
>   $date:=Current date
> End if
> 
> I set this kind of code up *automatically*. I find that I'm going it for
> methods that are only called from one or two places. Why? It makes no
> sense. Somewhere down the line something in me decided that every parameter
> made my life worse in some big way that was worth a lot of effort to avoid.
> So it's been my custom to make as many parameters optional as possible.
> Looking back, I think I made a mistake. Yes, it makes it easier to call a
> method if there are fewer parameters, but how much easier? Well, when there
> are only a few parameters, it's not really much of a gain. For long
> parameter lists, sure...but if I've got 6+ parameters, I might want to take
> another look at how I'm setting up the code.
> 
> Okay, now what about the *costs* of optional parameters? There are several:
> 
> -- The code inside the method is more complex, both for assignments and
> testing
> -- The code is harder to read and rewrite because it's more complex
> -- It's harder to scan for missing parameters.
> 
> So I'm being bold and making more explicit parameters and fewer optional
> ones.
> 
> With that said, sometimes I've ended up with optional parameters because a
> routine has various options. In that case, it is pretty nice to have an
> options object:
> 
> C_OBJECT($options_object)
> $options_object:=MakeMyWonderfulOptionsObject
> OB SET($options_object;"capitalize_words";True)
> MyWonderfulMethod(->[Table]Foo;5;Current date;$options_object)
> 
> This can be really helpful when there are several options. Speaking of
> several options, back to Rob's point (or what I took from what he said
> anyway.) Yeah, I'm 100% down with creating the object with all elements
> defined. Leaving out situations where this makes no sense at all (you know
> who you are), it's a great way to move forward. You create a method to
> define your object (thinking of each C_OBJECT of this sort as a "type") and
> then you always know that the elements you need are in place. You can
> 

Re(2): 4D db -> SAAS

2017-07-31 Thread Don Lapin via 4D_Tech
Hi Chuck,

I understand that part. Right now there are 200 customers, and we would like 
maybe 5x that many. Does the 4D Server approach work with that number of users? 
Wouldn't I need to write a web interface, and would that take as much time as 
rewriting in some other language? Also, what about multiple instances to handle 
network outages in some regions, etc.?

Thanks for the quick response,
Don


>You could turn into server version by adding customer field to each
>table and after every query query for that customer. It would entail. A
>customer table Witt user name customer and field for related queries
>
>Regards
>Chuck
>
>Sent from my iPhone
>
>> On Jul 31, 2017, at 3:04 PM, Don Lapin via 4D_Tech <4d_tech@lists.
>4d.com> wrote:
>> 
>> Hi Folks,
>> 
>> I have a single-user, non-web-based 4D product in a specific area of
>chemicals regulatory compliance. It has taken me about two years to
>develop the application. With the 4D solution, we are charging for a one-
>time purchase and then for upgrades (more-or-less annually). There is
>some proprietary information for each customer, which the user would not
>want exposed in some accidental manner.  
>> 
>> There's some pressure from competitors to offer (as some of them do) a
>cloud-based solution, where we could be more flexible in terms of how we
>priced things -- subscriptions for various lengths of time, etc. The
>revenue might be more sustainable.
>> 
>> I looked for earlier posts on cloud migration but wanted to ask for
>current ideas. The last thing I saw related to spinning up individual
>instances of 4D for each user, which sounds fairly expensive in terms of
>4D licenses. Also, right now there is no web interface in the product.
>> 
>> Any recommendations for a strategy which has worked? Should I rewrite
>the whole thing in some web-native language and then host on Heroku or
>similar? Would I have difficulty replicating the interface? Am I looking
>at another two years - or longer?
>> 
>> Thanks,
>> Don
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
>**
>4D Internet Users Group (4D iNUG)
>FAQ:  http://lists.4d.com/faqnug.html
>Archive:  http://lists.4d.com/archives.html
>Options: http://lists.4d.com/mailman/options/4d_tech
>Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>**

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Restricting a query

2017-07-31 Thread Chip Scheide via 4D_Tech
You can also filter BEFORE query.
for simplicity:
Query([table];[table]client_ID = $Current_Client_ID)
Query selection([table])

This will open 4D's query editor, and apply the query the user does to 
the selection you created before hand.

On Mon, 31 Jul 2017 11:34:12 -0700 (MST), jarosz via 4D_Tech wrote:
> I have a table which contains records for 10 different clients.
> I'd like to give a client the ability to search the table for only his
> records and not be able to see any of the other clients' records.
> 
> Is it possible to do this using the standard 4D Query editor by always
> applying an additional search criteria eg clientID=xxx?
> 
> Or do I need to build my own custom query editor?
> I'm using 4D 15.4.
> 
> I'd be interested to hear how others have approached this...
> 
> Many thanks
> 
> Michael Jarosz
> 
> 
> 
> 
> --
> View this message in context: 
> http://4d.1045681.n5.nabble.com/Restricting-a-query-tp5753437.html
> Sent from the 4D Tech mailing list archive at Nabble.com.
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

4D db -> SAAS

2017-07-31 Thread Don Lapin via 4D_Tech
Hi Folks,

I have a single-user, non-web-based 4D product in a specific area of chemicals 
regulatory compliance. It has taken me about two years to develop the 
application. With the 4D solution, we are charging for a one-time purchase and 
then for upgrades (more-or-less annually). There is some proprietary 
information for each customer, which the user would not want exposed in some 
accidental manner.  

There's some pressure from competitors to offer (as some of them do) a 
cloud-based solution, where we could be more flexible in terms of how we priced 
things -- subscriptions for various lengths of time, etc. The revenue might be 
more sustainable.

I looked for earlier posts on cloud migration but wanted to ask for current 
ideas. The last thing I saw related to spinning up individual instances of 4D 
for each user, which sounds fairly expensive in terms of 4D licenses. Also, 
right now there is no web interface in the product.

Any recommendations for a strategy which has worked? Should I rewrite the whole 
thing in some web-native language and then host on Heroku or similar? Would I 
have difficulty replicating the interface? Am I looking at another two years - 
or longer?

Thanks,
Don

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Restricting a query

2017-07-31 Thread David Adams via 4D_Tech
I'll take it as read that you have a solid reason for commingling the data
from your various clients.

Something I've seen and like too is along the lines of
Filter_AfterSearch(->[Table])

So, after *any* search, you run a filter against the table. This can be
used for all sorts of things:

-- Exclude records marked 'deleted'

-- Filter records based on the user's role. A Manager might see more
records than a Floor_Worker (or the other way around.)

-- Filter by some kind of location setting.

-- What you were talking about.

You can implement the Filter_AfterSearch method however you like, I've
regularly seen big case statements with hooks for tables with special
filter rules. There are more involved ways, but a "case of" is an easy way
to start and experiment. It's also easy in Filter_AfterSearch to check that
the table has a selection before you worry about filtering it.

If you use the standard query editor, then you need code to bring up the
editor which is immediately followed by a call to Filter_AfterSearch. That
should do it. Just remember to do the same with your custom queries too so
that you don't leak data from other customers. The good part is that you
still just need the one line of code:

Filter_AfterSearch(->[Table])
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Thinking about optional parameters and optional object elements

2017-07-31 Thread David Adams via 4D_Tech
Like everybody, I tend to develop habits/patterns/templates for my methods.
There are lots of benefits to consisincy:

-- If it worked before, it will work again.
-- It's a lot faster to do what you know rather than thinking everything
through from scratch each time.
-- Old methods look totally understandable, even after a long time.

So, I tend to name things pretty consitently, organize my methods in a
couple of basic ways and handle parameters in a particlar way.

But it's good to revisit old choices now and then and see if there's a
better way. Not long ago, I was reading some materials arguing aginst
optional parmeters. Not much after that, Rob Laveaux made a comment
(paraphrasing here) about initializing objects with *all* elements. In ther
words, create a C_OBJECT and populate it with all elements right away (even
if blank or default values) so that the rest of your code never has to
worry if the element exists or not. It does. All of this got me thinking
about these similar subjects: optional method parameters and optional
object elements. I thought I'd toss out a few words and see what other
people think and might offer. I'm in that brief period when I'm being open
minded about something. Soon I'll make some deciscions, and then I'll
probably stick with them for a few years. (Like most people, I'm right all
the time...but what I think is right does change down the years. Earlier
David Adams? What an idiot. Now I'm finally right...)

Anyway, I like explicit parameters, so I'm not down with pushing everything
into an object - I'm definitely not trying to start that discussion. But I
do tend to keep param lists short. Here's an imaginary example of a method
that takes 2-3 parameters:

MyWonderfulMethod(->[Table]Foo;5)
MyWonderfulMethod(->[Table]Foo;5;Current date)

$3 is optional:

$table_pointer:=$1
$day_count:=$2
If (count parameters>=3)
   $date:=$3
Else
   $date:=Current date
End if

I set this kind of code up *automatically*. I find that I'm going it for
methods that are only called from one or two places. Why? It makes no
sense. Somewhere down the line something in me decided that every parameter
made my life worse in some big way that was worth a lot of effort to avoid.
So it's been my custom to make as many parameters optional as possible.
Looking back, I think I made a mistake. Yes, it makes it easier to call a
method if there are fewer parameters, but how much easier? Well, when there
are only a few parameters, it's not really much of a gain. For long
parameter lists, sure...but if I've got 6+ parameters, I might want to take
another look at how I'm setting up the code.

Okay, now what about the *costs* of optional parameters? There are several:

-- The code inside the method is more complex, both for assignments and
testing
-- The code is harder to read and rewrite because it's more complex
-- It's harder to scan for missing parameters.

So I'm being bold and making more explicit parameters and fewer optional
ones.

With that said, sometimes I've ended up with optional parameters because a
routine has various options. In that case, it is pretty nice to have an
options object:

C_OBJECT($options_object)
$options_object:=MakeMyWonderfulOptionsObject
OB SET($options_object;"capitalize_words";True)
MyWonderfulMethod(->[Table]Foo;5;Current date;$options_object)

This can be really helpful when there are several options. Speaking of
several options, back to Rob's point (or what I took from what he said
anyway.) Yeah, I'm 100% down with creating the object with all elements
defined. Leaving out situations where this makes no sense at all (you know
who you are), it's a great way to move forward. You create a method to
define your object (thinking of each C_OBJECT of this sort as a "type") and
then you always know that the elements you need are in place. You can
assign default values at the same time, which is handy. If you need to
add/remove/rename elements, you know right where you go to do it.

Also speaking of objects: Use custom constants for element names! For those
of you with access to current tech notes, there's a newish one that I wrote
up with Cannon Smith with lots of details and handy code from Cannon (so
you know it's good) to manage constants entirely within code. Jim Dorrance
has also kindly posted custom constants code here in the past, so that's in
the archives. Kirk Brooks often mentions using custom constants for his
element names, so he may have a few thoughts too.

Managing Custom Constants with Code
http://kb.4d.com/assetid=77806

Anyway, back to objects...as many of you know from you're work, they're
quite handy for storing data that is used through multiple methods to
complete a task. Done right, this can greatly reduce parameter list lengths
without compromising the ability to test your code and without necessarily
adding undue complexity to your methods.

So, open to thoughts and suggestions...but only briefly ;-)

Re: Restricting a query

2017-07-31 Thread Kirk Brooks via 4D_Tech
Jarosz,
For that you'll want to build your own query editor. To achieve that sort
of separation of data you'll need to be careful that all queries and
selections created by relations are segregated by client.

On Mon, Jul 31, 2017 at 11:34 AM, jarosz via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> I have a table which contains records for 10 different clients.
> I'd like to give a client the ability to search the table for only his
> records and not be able to see any of the other clients' records.
>
> Is it possible to do this using the standard 4D Query editor by always
> applying an additional search criteria eg clientID=xxx?
>
> Or do I need to build my own custom query editor?
> I'm using 4D 15.4.
>
> I'd be interested to hear how others have approached this...
>
> Many thanks
>
> Michael Jarosz
>
>
>
>
> --
> View this message in context: http://4d.1045681.n5.nabble.
> com/Restricting-a-query-tp5753437.html
> Sent from the 4D Tech mailing list archive at Nabble.com.
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Restricting a query

2017-07-31 Thread Chuck Miller via 4D_Tech
Not sure if views work with normal query but I would start there. 

Regards
Chuck 

Sent from my iPhone

> On Jul 31, 2017, at 2:34 PM, jarosz via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> I have a table which contains records for 10 different clients.
> I'd like to give a client the ability to search the table for only his
> records and not be able to see any of the other clients' records.
> 
> Is it possible to do this using the standard 4D Query editor by always
> applying an additional search criteria eg clientID=xxx?
> 
> Or do I need to build my own custom query editor?
> I'm using 4D 15.4.
> 
> I'd be interested to hear how others have approached this...
> 
> Many thanks
> 
> Michael Jarosz
> 
> 
> 
> 
> --
> View this message in context: 
> http://4d.1045681.n5.nabble.com/Restricting-a-query-tp5753437.html
> Sent from the 4D Tech mailing list archive at Nabble.com.
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Restricting a query

2017-07-31 Thread jarosz via 4D_Tech
I have a table which contains records for 10 different clients.
I'd like to give a client the ability to search the table for only his
records and not be able to see any of the other clients' records.

Is it possible to do this using the standard 4D Query editor by always
applying an additional search criteria eg clientID=xxx?

Or do I need to build my own custom query editor?
I'm using 4D 15.4.

I'd be interested to hear how others have approached this...

Many thanks

Michael Jarosz




--
View this message in context: 
http://4d.1045681.n5.nabble.com/Restricting-a-query-tp5753437.html
Sent from the 4D Tech mailing list archive at Nabble.com.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Heads Up about Write Pro Style Transformations

2017-07-31 Thread Keith Culotta via 4D_Tech
This is something to be aware of if you plan to use Write Pro text outside of 
Write Pro areas.

A bug report has been submitted, but for now Write Pro Style Transformations 
are cosmetic only.

For instance, if you apply the Write Pro transformation 
  Uppercase to "This is a Test", 
  you will see "THIS IS A TEST" in the document.

If you copy the text, or retrieve it using "ST Get plain text", you end up with 
"This is a Test".

Keith - CDI
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Recommendations?

2017-07-31 Thread npdennis via 4D_Tech
I would recommend using 4D to create the PDF documents, cross platform , easy 
to use component.

http://www.greatext.com/PDFGenerator_v15.zip 




> On Jul 31, 2017, at 7:39 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I wouldn't recommend a plug-in (or PHP) for PDF creation for just 100-200 
> PDFs a month. It's a real pain in the backside. The printer driver-based 
> solutions are perfectly reliable and are so much easier to maintain.
> 
> --
> Jeffrey Kain
> jeffrey.k...@gmail.com
> 
>> On Jul 30, 2017, at 6:41 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> If you don't do that use a scheme for producing PDFs that doesn't depend on
>> a print driver.
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Recommendations?

2017-07-31 Thread Jeffrey Kain via 4D_Tech
I wouldn't recommend a plug-in (or PHP) for PDF creation for just 100-200 PDFs 
a month. It's a real pain in the backside. The printer driver-based solutions 
are perfectly reliable and are so much easier to maintain.

--
Jeffrey Kain
jeffrey.k...@gmail.com

> On Jul 30, 2017, at 6:41 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> If you don't do that use a scheme for producing PDFs that doesn't depend on
> a print driver.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**