Evgeny Shvarov · Sep 30, 2020 go to post

AFAIK Try/catch indeed slows a bit the execution (@Dan.Pasco is it true?)

And try/catch shouldn’t be presented in every method - it could be somewhere on top and in the places where you need to catch errors.

I like your answer but for better understanding it deserves a sample code to see how do you manage error scenarios.

we really lack of good templates for beginners on how to better handle errors in serious project.

Evgeny Shvarov · Sep 29, 2020 go to post

Thanks for the insights, @Herman Slagman!

$ZT + Label is better than try/catch

%Status is better than try/catch too.

why %Status is better than throw ("something went wrong") approach?

But, how to do you track errors of your solutions happen on a customer side? There is an elegant way to manage this with try/catch:

catch e {

 do e.log() // store the error and stack in Application Errors

// handle error

} 

How could you manage this with %Status and $ZT approach?

Evgeny Shvarov · Sep 28, 2020 go to post

Thanks, Jon!

Why try-catch doesn't work well without finally? I think finally is only for the cases when you need to free resources taken, isn't it?

Evgeny Shvarov · Sep 28, 2020 go to post

Thanks for the answer, Gertjan!

May I ask you, why don't you like try/catch? Is it slow?

Imho it has all the error and stack information, what's wrong with try/catch?

Evgeny Shvarov · Sep 28, 2020 go to post

I think if the method should return something else, it should return not %Status but the value.

Evgeny Shvarov · Sep 27, 2020 go to post

Thanks, Ben!

This is another good topic for discussion on should the test code be included in the production

Evgeny Shvarov · Sep 25, 2020 go to post

What is the easy way to add such snippets to my VSCode?

Should it be a yet-another VSCode extension? 

Evgeny Shvarov · Sep 25, 2020 go to post

I agree on VSCode as a tool to use it. But what are the ideas on advertising and making improvements? A git repository then?

Evgeny Shvarov · Sep 24, 2020 go to post

BTW, @Guillaume Rongier recently published an amazing example of a full-stack app: csvgen-ui.

You can install it with zpm "install csvgen-ui" and it gives you the option to import any csv to IRIS just with drag-n-drop.  Here is the demo:

  

Evgeny Shvarov · Sep 17, 2020 go to post

Hi devs!

There is a good question in discord, whether it's possible to use other templates for a full-stack application. - YES! Sure, use and build whatever you want! You are not limited to these templates! Moreover, we are very curious about what are your templates, techniques on building full-stack apps with IRIS. 

Evgeny Shvarov · Sep 14, 2020 go to post

You've just posted an article!) I wasn't aware too.

We need to check and maybe we'll include this as well!

We may add more bonuses - the contest will start next Monday, we still have time to add more ;)

Evgeny Shvarov · Sep 14, 2020 go to post

I respect your choice. Out of curiosity, what other than SQLCODE variables you noticed being changed "without a warning"?

On contrary, I started to find it handy to copy and paste working sql into &sql(). Also, SQL code looks more readable.

Evgeny Shvarov · Sep 11, 2020 go to post

Haha!

A good one, thanks, Igor! I also added ObjectScirpt highlighting - it helps in reading.

Personally I find the 

q:'$d(name) "Name required"

not very unreadable.

quit:'$data(name) "Name Required"

is better, of course.

But the second one is ... Mostly due to several ##class() stuff.

Evgeny Shvarov · Sep 6, 2020 go to post

And we changed it one more time.

Now the proper switch to the test repo is:

repo -n registry -r -url https://test.pm.community.intersystems.com/registry/ -user test -pass PassWord42

The text in the article is updated accordingly

Evgeny Shvarov · Aug 31, 2020 go to post

Now it's approved! 

Yes, the review process in OEX takes human time and sometimes it's not immediate) 

@Robert Cemper, thanks again for yet-another useful contribution to the community!

Evgeny Shvarov · Aug 27, 2020 go to post

It's great to see the ZPM slide! like it!

BTW, there is URL on OEX, which shows only the applications which could be deployed via ZPM.